From 591d2b6167af53ce07b060711a4074f1e19c5f3f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 8 May 2021 21:25:47 +0530 Subject: add basic user-definable keybinds --- src/lisp/std.lisp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/lisp/std.lisp') diff --git a/src/lisp/std.lisp b/src/lisp/std.lisp index a256125..fe09a8a 100644 --- a/src/lisp/std.lisp +++ b/src/lisp/std.lisp @@ -72,3 +72,18 @@ acc (rev-helper (cdr p) (cons (car p) acc)))) (rev-helper ls '()))) + +(define (append l1 l2) + (if (null? l1) + l2 + (cons (car l1) + (append (cdr l1) l2)))) + +(define (cross xs ys) + (if (or (null? xs) + (null? ys)) + '() + (fold '() + append + (map (lambda (x) + (map (lambda (y) (list x y)) ys)) xs)))) -- cgit v1.2.3