Whether you agree that JavaScript is a Lisp or not, you can still harness the Lisp-inspired power of LJSP in your app. LJSP derives most of its functions from Clojure libraries. Clojurians will notice the extent to which we treated the Clojure docs not only as our requirements' specification, but as a great place to copy and paste text for our docs! For this, we offer heart-felt, tremendous thanks to the Clojure community.
For information on how to use LJSP, please visit our official documentation site: LJSP.org
NPM npm i ljsp-core
YARN yarn add ljsp-core
import { log, condp, str, mult, count, instance$ } from 'ljsp-core';
log("Enter a number: ")
(function(line) {
log(
condp(eq, value,
1, "one",
2, "two",
3, "three",
str('unexpected value, "', value, '"')))
log(
condp(instance$, value,
Number, () => mult(value, 2),
String, () => mult(count(value), 2)))
})(Number(readLine()))
See the CONTRIBUTING.md