25 lines
318 B
Fennel
25 lines
318 B
Fennel
;;; 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))
|
|
|
|
(fn std.fn? [f]
|
|
(= (type f) :function))
|
|
|
|
(fn std.s-empty? [s]
|
|
(or (= nil s)
|
|
(= "" s)))
|
|
|
|
std
|
|
;;; std.fnl ends here
|