| Shift+Enter | Run current cell |
| Ctrl+Enter | Run cell and add new below |
| Ctrl+Shift+Enter | Run all cells |
| Ctrl+D | Delete current cell |
| Ctrl+Up | Move to previous cell |
| Ctrl+Down | Move to next cell |
| Tab | Insert 2 spaces |
This is a Scheme-like LISP interpreter supporting:
; Define a function
(define (factorial n)
(if (<= n 1)
1
(* n (factorial (- n 1)))))
(factorial 10) ; => 3628800
; Higher-order functions
(map (lambda (x) (* x x)) '(1 2 3 4 5))
; => (1 4 9 16 25)
; Filter and reduce
(filter even? (range 10))
; => (0 2 4 6 8)
(reduce + 0 '(1 2 3 4 5))
; => 15
; Let bindings
(let ((x 10)
(y 20))
(+ x y)) ; => 30
; Recursive named let
(let loop ((n 5) (acc 1))
(if (<= n 1)
acc
(loop (- n 1) (* acc n))))
; => 120