-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparenboost.lisp
More file actions
42 lines (30 loc) · 818 Bytes
/
parenboost.lisp
File metadata and controls
42 lines (30 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(in-package :parenboost)
(defpsmacro length> (val len)
`(> (chain ,val length)
,len))
(defpsmacro length< (val len)
`(< (chain ,val length)
,len))
(defpsmacro length= (val len)
`(= (chain ,val length)
,len))
(defpsmacro emptyp (val)
`(= 0 (length ,val)))
(defpsmacro with-timeout ((sec) &body body)
`(set-timeout (lambda () ,@body)
,sec))
(defpsmacro with-interval ((sec) &body body)
`(set-interval (lambda () ,@body)
,sec))
(defpsmacro undefinedp (val)
`(undefined ,val))
(defpsmacro definedp (val)
`(defined ,val))
(defpsmacro nanp (val)
`(is-na-n ,obj))
(defpsmacro finitep (obj)
`(is-finite ,obj))
(defpsmacro make (class &rest args)
`(new (,class ,@args)))
(defpsmacro throw-error (&rest args)
`(throw (new (*error ,@args))))