Permalink
Browse files

Update the `maybe` library object to take advantage of the new `optio…

…nal(_)::or_else_fail/1` predicate
  • Loading branch information...
pmoura committed Dec 5, 2017
1 parent a746775 commit 7ad9f537d13ca1cabf6818d8aa3cef7951933dce
Showing with 3 additions and 3 deletions.
  1. +3 −3 library/maybe.lgt
View
@@ -21,9 +21,9 @@
:- object(maybe).
:- info([
version is 0.1,
version is 0.2,
author is 'Paulo Moura',
date is 2017/11/03,
date is 2017/12/05,
comment is 'Types and predicates for type-checking and handling optionals. Inspired by Haskell.',
see_also is [optional, optional(_)]
]).
@@ -61,7 +61,7 @@
cat([], []).
cat([Optional| Optionals], Values) :-
( optional(Optional)::or_else_call(Value, fail) ->
( optional(Optional)::or_else_fail(Value) ->
Values = [Value| RestValues]
; Values = RestValues
),

0 comments on commit 7ad9f53

Please sign in to comment.