Skip to content

Instantly share code, notes, and snippets.

@tiye
Created September 4, 2012 07:23
Show Gist options
  • Select an option

  • Save tiye/3617971 to your computer and use it in GitHub Desktop.

Select an option

Save tiye/3617971 to your computer and use it in GitHub Desktop.
Scirpus fabonacci demo
= a (# 1 24 53 45 3 4 56 578 89 56 56)
= sort
-> (start end list)
if (>= end a.length) (<- list)
if (>= start end)
<- (sort 0 (+ end 1) list)
do
= small (. list start)
= big (. list (+ start 1))
if (> small big)
do
= t small
= small big
= big t
= (. list start) small
= (. list (+ start 1)) big
<- (sort (+ start 1) end list)
console.log (sort 0 0 a)
= f
-> (n)
if (< n 2)
<- 1
<-
+
f (- n 1)
f (- n 2)
. console (log (f 20))
-- 看到这种代码你会不会疯掉?
= http (require 'http')
= handler
-> (req res) (res.end 'nodejs demo')
= app
http.createServer handler
app.listen 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment