aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib.functions.lisp3
-rw-r--r--packages.lisp6
2 files changed, 6 insertions, 3 deletions
diff --git a/lib.functions.lisp b/lib.functions.lisp
index c7b3ed1..30c1e64 100644
--- a/lib.functions.lisp
+++ b/lib.functions.lisp
@@ -29,3 +29,6 @@ each member is STEP distance apart."
(fn parse-integer* (inp) (-> (string) (or integer list))
(parse-integer inp :junk-allowed t))
+
+(fn take (n lst) (-> (fixnum list) list)
+ (subseq lst 0 n))
diff --git a/packages.lisp b/packages.lisp
index d50945b..58c848e 100644
--- a/packages.lisp
+++ b/packages.lisp
@@ -21,15 +21,15 @@
(:use :cl)
(:export
:_ :--> :->>
- :while
:-> :fn
+ :while
:$))
(defpackage lib.functions
(:use :cl :lib.macros)
(:export
- :range
- :parse-integer*))
+ :parse-integer*
+ :range :take))
(defpackage main
(:use :cl :lib.macros)