Skip to content

Commit

Permalink
Merge 1497f86 into c73fcb6
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Hendershott committed Jun 30, 2018
2 parents c73fcb6 + 1497f86 commit 9b8e20e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functional-doc/scribblings/data/functional.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,12 @@ using @tech{either}.
(define (safe-first lst)
(if (empty? lst)
(failure "attempted to get the first element of an empty list")
(just (first lst))))
(success (first lst))))

(define (safe-rest lst)
(if (empty? lst)
(failure "attempted to get the rest of an empty list")
(just (rest lst))))
(success (rest lst))))

(define (divide-first-two lst)
(do [a <- (safe-first lst)]
Expand Down

0 comments on commit 9b8e20e

Please sign in to comment.