mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-27 03:35:34 +00:00
Add Hy language.
Hy is a dialect of Lisp that’s embedded in Python.
This commit is contained in:
9
samples/Hy/fibonacci.hy
Normal file
9
samples/Hy/fibonacci.hy
Normal file
@@ -0,0 +1,9 @@
|
||||
;; Fibonacci example in Hy.
|
||||
|
||||
(defn fib [n]
|
||||
(if (<= n 2) n
|
||||
(+ (fib (- n 1)) (fib (- n 2)))))
|
||||
|
||||
(if (= __name__ "__main__")
|
||||
(for [x [1 2 3 4 5 6 7 8]]
|
||||
(print (fib x))))
|
||||
Reference in New Issue
Block a user