Skip to content

Commit

Permalink
import/list: [fix] Find,Get bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Lovnički committed Aug 24, 2019
1 parent b8e7f67 commit fcca03f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions import/list.plam
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ flip = \p x y. p y x

-- find Church numeral x in list l
----------------------------------------------------------------
fFind = \f. \x l c. (eq x (head l)) c (f x (tail l) (S c))
fFind = \f. \x l c. (isEmpty l) empty ((eq x (head l)) c (f x (tail l) (S c)))
Find = \x l. Y fFind x l 0

-- get list element at index i
----------------------------------------------------------------
fGet = \f. \i l c. (eq i c) (head l) (f i (tail l) (S c))
fGet = \f. \i l c. (isEmpty l) empty ((eq i c) (head l) (f i (tail l) (S c)))
Get = \i l. Y fGet i l 0

-- merge lists x and y
Expand Down

0 comments on commit fcca03f

Please sign in to comment.