summaryrefslogtreecommitdiff
path: root/Alpha/Core.scm
diff options
context:
space:
mode:
Diffstat (limited to 'Alpha/Core.scm')
-rw-r--r--Alpha/Core.scm22
1 files changed, 2 insertions, 20 deletions
diff --git a/Alpha/Core.scm b/Alpha/Core.scm
index 997bc4f..192a74f 100644
--- a/Alpha/Core.scm
+++ b/Alpha/Core.scm
@@ -2,9 +2,8 @@
#:use-module ((ice-9 format))
#:use-module ((system vm program))
#:use-module ((ice-9 rdelim) #:select (read-line))
- #:use-module ((srfi srfi-1) #:select (any))
- #:export (fmt printf pr prn
- first ffirst second rest last butlast
+ #:use-module (srfi srfi-1)
+ #:export (fmt printf pr prn rest last butlast
true? false? some? empty?
-> ->> fn /. curry comp
repeat
@@ -29,13 +28,6 @@
acc
(foldl f (f acc (car lst)) (cdr lst))))
-(define fold foldl)
-
-(define (unfold f init pred)
- (if (pred init)
- (cons init '())
- (cons init (unfold f (f init) pred))))
-
(define (sum lst) (fold + 0 lst))
(define (product lst) (fold * 1 lst))
@@ -62,19 +54,9 @@
(define (empty? a)
(equal? a '()))
-(define (first a)
- "Return the first item in the collection."
- (if (pair? a)
- (car a)
- '()))
-
(define (ffirst a)
(first (first a)))
-(define (second a)
- "Returns the next item after the first."
- (cadr a))
-
(define (rest a)
"Returns a list of the items after the first."
(cdr a))