forbble stability and usability
This commit is contained in:
parent
166c9d4889
commit
c7d3d7f457
|
@ -88,11 +88,13 @@
|
|||
|
||||
; Defines a given symbol using a given list of Forth inputs
|
||||
(def compile (fn (func sym) (
|
||||
; Get next symbol
|
||||
(def _x (at 0 func))
|
||||
(if (= _x "$") (rest func)
|
||||
(if (iserr _x) _x
|
||||
(if (= _x "$") (rest func)
|
||||
(at 1 (
|
||||
(defe sym (ap (eval sym) _x))
|
||||
(compile (rest func) sym))
|
||||
(compile (rest func) sym)))
|
||||
)))))
|
||||
|
||||
; Evaluate a list of Forth inputs
|
||||
|
@ -143,9 +145,10 @@
|
|||
; Basic imperial distances
|
||||
(feval (: "ft" 12 * $))
|
||||
(feval (: "yd" ft 3 * $))
|
||||
(feval (: "yds" yd $))
|
||||
(feval (: "in" $))
|
||||
(feval (: "i>f" 1 ft / $))
|
||||
(feval (: "i>y" 1 yd / $))
|
||||
(feval (: ">ft" 1 ft / $))
|
||||
(feval (: ">yds" 1 yd / $))
|
||||
|
||||
; Convert between Farenheit and Celcius
|
||||
(feval (: "f>c" 32 - 5 * 9 /$))
|
||||
|
|
Loading…
Reference in New Issue