Skip to content

re: I can't understand the twiceOptional function from Data61 fp course. VIEW POST

  1. You are wrong about the partial application, it is like this (note the parenthesis):
twiceOptional (+) (Full 1) (Full 2) = (applyOptional . mapOptional (+)) (Full 1) (Full 2)
  1. Because when bindOptional encounters an Empty it does not evaluate further and just returns Empty
code of conduct - report abuse