diff --git a/build/ludus.jimage b/build/ludus.jimage index d81d9b4..bfe468a 100644 Binary files a/build/ludus.jimage and b/build/ludus.jimage differ diff --git a/build/out.mjs b/build/out.mjs index e026112..aa7e8dc 100644 --- a/build/out.mjs +++ b/build/out.mjs @@ -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 { diff --git a/build/out.wasm b/build/out.wasm index fb581fb..28a5214 100755 Binary files a/build/out.wasm and b/build/out.wasm differ diff --git a/prelude.ld b/prelude.ld index d9806c5..4f8cd98 100644 --- a/prelude.ld +++ b/prelude.ld @@ -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? {