Skip to content

Commit

Permalink
Add a bit more explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
process-bot committed Dec 22, 2014
1 parent 9c9a4bb commit e5e9a4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Lazy.elm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ pattern match on a value, for example, when appending lazy lists:
Cons first rest ->
cons first (append rest list2))
By using `andThen` we ensure that neither `lazyList1` or `lazyList2` are forced
before they are needed. So as written, the `append` function delays the pattern
matching until later.
-}
andThen : Lazy a -> (a -> Lazy b) -> Lazy b
andThen a callback =
Expand Down

0 comments on commit e5e9a4b

Please sign in to comment.