This commit is contained in:
Scott Richmond 2025-06-12 16:38:54 -04:00
parent ec7ffbdd9a
commit 508e4b4be9
4 changed files with 16 additions and 11 deletions

Binary file not shown.

View File

@ -6489,7 +6489,7 @@ var __emscripten_stack_alloc = (a0) => (__emscripten_stack_alloc = wasmExports['
var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
var ___cxa_is_pointer_type = createExportWrapper('__cxa_is_pointer_type', 1);
var dynCall_jiji = Module['dynCall_jiji'] = createExportWrapper('dynCall_jiji', 5);
var ___emscripten_embedded_file_data = Module['___emscripten_embedded_file_data'] = 1819972;
var ___emscripten_embedded_file_data = Module['___emscripten_embedded_file_data'] = 1829452;
function invoke_i(index) {
var sp = stackSave();
try {

Binary file not shown.

View File

@ -2,11 +2,13 @@
& some forward declarations
& TODO: fix this so that we don't need (as many of) them
fn add
fn and
fn append
fn apply_command
fn assoc
fn atan/2
fn count
fn deg/rad
fn dict
fn first
@ -15,7 +17,9 @@ fn get
fn join
fn mod
fn neg?
fn not
fn print!
fn set
fn some?
fn store!
fn string
@ -89,6 +93,17 @@ fn eq? {
else false
}
fn neq? {
"Returns true if none of the arguments have the same value."
(x) -> false
(x, y) -> not (eq? (x, y))
(x, y, ...zs) -> {
let z_set = set(zs)
let xyz_set = ${x, y, ...z_set}
eq? (count (xyz_set), add(2, count (zs)))
}
}
&&& true & false: boolean logic (part the first)
fn bool? {
"Returns true if a value is of type :boolean."
@ -123,16 +138,6 @@ fn not {
(_) -> false
}
fn neq? {
"Returns true if none of the arguments have the same value."
(x) -> false
(x, y) -> not (eq? (x, y))
(x, y, ...zs) -> {
let z_set = set(zs)
let xyz_set = ${x, y, ...z_set}
eq? (count (xyz_set), add(2, count (zs)))
}
}
& tuples: not a lot you can do with them functionally
fn tuple? {