From 423a5778c62a3c6a47e4466e9b5f581e0dcb3c5e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 9 May 2020 15:02:30 -0700 Subject: Add member? and contains? --- Alpha/Core.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Alpha') 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)) -- cgit v1.2.3