2019-01-15 11:20:10 +11:00
|
|
|
;;; std.fnl --- A small standard library
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;; Porting a few functions that I'm used to from other Lisps.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(var std {})
|
|
|
|
|
|
|
|
;;;
|
|
|
|
;; Functions
|
|
|
|
|
|
|
|
(fn std.zero? [n]
|
|
|
|
(= 0 n))
|
|
|
|
|
2019-01-15 15:14:29 +11:00
|
|
|
(fn std.fn? [f]
|
|
|
|
(= (type f) :function))
|
|
|
|
|
|
|
|
(fn std.s-empty? [s]
|
|
|
|
(or (= nil s)
|
|
|
|
(= "" s)))
|
|
|
|
|
2019-01-15 11:20:10 +11:00
|
|
|
std
|
|
|
|
;;; std.fnl ends here
|