diff options
author | Ben Sima <ben@bsima.me> | 2020-05-09 15:02:30 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-05-09 15:02:30 -0700 |
commit | 423a5778c62a3c6a47e4466e9b5f581e0dcb3c5e (patch) | |
tree | 9cb87def84442291f888e5c3c5aa94cc23b32f7b /Alpha | |
parent | 2c18630e5fb28b428f409f8c4c900bc220d12b3f (diff) |
Add member? and contains?
Diffstat (limited to 'Alpha')
-rw-r--r-- | Alpha/Core.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Alpha/Core.scm b/Alpha/Core.scm index 9aecc0e..6666e7d 100644 --- a/Alpha/Core.scm +++ b/Alpha/Core.scm @@ -8,7 +8,7 @@ true? false? nil nil? some? empty? -> ->> fn /. curry comp repeat - inc dec + inc dec member? contains? comment get-source* get-source source)) (define (flip f) (lambda (x y) (f y x))) @@ -232,3 +232,8 @@ (define (source p) "Print the source of a procedure." (pr (get-source p))) + +(define member? member) + +(define (contains? ls x) + (member? x ls)) |