Following a nested argument failure

An order-processing program uses the explicitly declared function signatures below. Integer literals have type Int, function arguments must match parameter types exactly, and there are no implicit conversions.


Plain text
isReady: Int -> Bool
pick: (Bool, Int, Int) -> Int
report: (Bool, Int) -> Int


Check this entire expression:


Plain text
report(isReady(pick(isReady(27), isReady(31), 19)), 42)


Enter its type, Int or Bool, if every required check succeeds. Otherwise enter rejected, even if the outer function has a declared result type.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Type Checking and Inference Questions: