Added (times i fn) to prelude
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
;
|
||||
(echo "Loading prelude.lisp")
|
||||
|
||||
; translate
|
||||
(defn translate
|
||||
(r p)
|
||||
(clone
|
||||
r
|
||||
(rect
|
||||
(of p :x)
|
||||
(of p :y)
|
||||
(of r :w)
|
||||
(of r :h))))
|
||||
(r p)
|
||||
(clone r
|
||||
(rect
|
||||
(of p :x)
|
||||
(of p :y)
|
||||
(of r :w)
|
||||
(of r :h))))
|
||||
; times
|
||||
(defn times
|
||||
(v f)
|
||||
(
|
||||
(f v)
|
||||
(if
|
||||
(gt v 1)
|
||||
(times
|
||||
(sub v 1) f))))
|
||||
Reference in New Issue
Block a user