Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

Commit 6f47558

Browse files
committed
docs: add example examples/aoc-24/day-01/part_01
1 parent d66b80d commit 6f47558

16 files changed

Lines changed: 1578 additions & 120 deletions

‎CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ add_library(intp STATIC
1919
${CMAKE_SOURCE_DIR}/src/intp/types.cpp
2020
${CMAKE_SOURCE_DIR}/src/intp/interpreter.cpp
2121
${CMAKE_SOURCE_DIR}/src/intp/builtins.cpp
22+
${CMAKE_SOURCE_DIR}/src/intp/builtin-modules/builtin_module_core.cpp
2223
${CMAKE_SOURCE_DIR}/src/intp/builtin-modules/builtin_module_list.cpp
24+
${CMAKE_SOURCE_DIR}/src/intp/builtin-modules/builtin_module_io.cpp
2325
)
2426

2527
add_executable(lbd

‎SPEC_DRAFT.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- TODO: Support parsing code that ends with an id. for example "a", given is already defined previously.
22
- TODO: Add support for List at a language level.
3-
- TODO: Type checking.
3+
- TODO: Type checking.
4+
- TODO: Add documentation for Builtins.

‎docs/SIGNATURE.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Builtin's Signature
2+
3+
```haskell
4+
print: Any... -> Void
5+
add: Float -> Float -> Float
6+
sub: Float -> Float -> Float
7+
mul: Float -> Float -> Float
8+
cmp: Float -> Float -> Float
9+
if_zero: Float -> A -> B -> A|B
10+
sort: List<Float> -> List<Float>
11+
parse_float: String -> Float
12+
13+
-- List module
14+
list: Any... -> List
15+
list_size: List -> Float
16+
list_get: List -> Float -> Any
17+
list_remove: List -> Float -> Any
18+
list_append: List -> Any -> Void
19+
map: (A -> B) -> List<A> -> List<B>
20+
transpose: List<List> -> List<List>
21+
zip: List<List> -> List<List>
22+
foldr: (A -> B -> B) -> List<A> -> B -> B
23+
24+
-- IO module
25+
slurp_file: String -> String
26+
lines: String -> List<String>
27+
split: String -> String -> List<String>
28+
```
29+
30+
> TODO: Add Alias for Path as String, etc.

0 commit comments

Comments
 (0)