Language-LispPerl
view release on metacpan or search on metacpan
lib/Language/LispPerl.pm view on Meta::CPAN
(def t (->AnyEvent timer
{:after 1
:interval 1
:cb (fn [ & args]
(println count)
(set! count (+ count 1))
(if (>= count 10)
(set! t nil)))}))
(.AnyEvent::CondVar::Base recv cv)
=head3 Implemeting your own native Lisp functions
.TBC.
=head3 This lisp implementation
=head4 Atoms
* Reader forms
* Symbols :
foo, foo#bar
* Literals
* Strings :
"foo", "\"foo\tbar\n\""
* Numbers :
1, -2, 2.5
* Booleans :
true, false . Or from Perl: Language::LispPerl->true() and Language::LispPerl->false()
* Nil :
nil . Or from Perl: Language::LispPerl->nil();
* Keywords :
:foo
* Lists :
(foo bar)
* Vectors :
[foo bar]
* Maps :
{:key1 value1 :key2 value2 "key3" value3}
=head4 Macro charaters
* Quote ('). :
'(foo bar)
* Comment (;) :
; comment
* Dispatch (#) :
* Accessor (:) :
#:0 ; index accessor
#:"key" ; key accessor
#::key ; key accessor
* Sender (!) :
#!"foo"
* XML ([) :
#[body ^{:attr "value"}]
* Metadata (^) :
^{:key value}
* Syntax-quote (`) :
`(foo bar)
* Unquote (~) :
`(foo ~bar)
* Unquote-slicing (~@) :
`(foo ~@bar)
=head4 Builtin lisp Functions
* list :
(list 'a 'b 'c) ;=> '(a b c)
* car :
(car '(a b c)) ;=> 'a
* cdr :
(cdr '(a b c)) ;=> '(b c)
* cons :
(cons 'a '(b c)) ;=> '(a b c)
* key accessor :
( run in 0.744 second using v1.01-cache-2.11-cpan-39bf76dae61 )