package tiny_languages
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Small languages from scratch: Scheme, Lisp, Smalltalk-80, Pascal, BASIC, JavaScript, HTML, CSS and more
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.3.6.tar.gz
md5=7c636383d146d30ac6f2fa234a6253c8
sha512=c79f3823c5f8f57e5038eb640d487c61168b84aa07c61999d6622ef9fd0c890e2b03b4c6a7cdbbe9352a49e25dda00ac7bb14693cee8e3d7beeed251351a2af0
doc/src/tiny_languages.lisp/Lisp_prelude.ml.html
Source file Lisp_prelude.ml
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 43 44 45 46(* Claude Code * * Copyright (C) 2026 Yoann Padioleau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public License * (LGPL) as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. *) (* See Lisp_prelude.mli *) let text = {| (defmacro when (cond &rest body) (list 'if cond (cons 'progn body))) (defmacro unless (cond &rest body) (cons 'if (cons cond (cons nil body)))) (defmacro push (x place) (list 'setq place (list 'cons x place))) (defmacro pop (place) (list 'prog1 (list 'car place) (list 'setq place (list 'cdr place)))) ;; (dolist (x list) body...): body with x each element in turn (defmacro dolist (spec &rest body) (list 'let (list (list '--dolist-tail-- (car (cdr spec))) (car spec)) (list 'while '--dolist-tail-- (list 'setq (car spec) '(car --dolist-tail--)) (cons 'progn body) '(setq --dolist-tail-- (cdr --dolist-tail--))))) ;; (dotimes (i n) body...): body with i from 0 to n - 1 (defmacro dotimes (spec &rest body) (list 'let (list (list '--dotimes-limit-- (car (cdr spec))) (list (car spec) 0)) (list 'while (list '< (car spec) '--dotimes-limit--) (cons 'progn body) (list 'setq (car spec) (list '1+ (car spec)))))) (defun mapc (f list) (dolist (x list) (funcall f x)) list) (defun cadr (x) (car (cdr x))) (defun cddr (x) (cdr (cdr x))) (defun zerop (n) (= n 0)) |}
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>