Add default param values #18

Merged
probablycorey merged 3 commits from defaults into main 2025-11-03 16:54:43 +00:00
Owner
add = do x y=1: x + y end

echo (add 5)
echo (add 5 10)

Output:

6
15

Only works with constant values for now: strings, numbers, booleans, and null.

If we want to add arrays and dictionaries we can probably do it all in the compiler.

``` add = do x y=1: x + y end echo (add 5) echo (add 5 10) ``` Output: ``` 6 15 ``` Only works with constant values for now: strings, numbers, booleans, and null. If we want to add arrays and dictionaries we can probably do it all in the compiler.
defunkt added 3 commits 2025-11-03 00:53:09 +00:00
probablycorey approved these changes 2025-11-03 16:54:40 +00:00
probablycorey left a comment
Owner

Nice!

Nice!
probablycorey merged commit fec4b626df into main 2025-11-03 16:54:43 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: probablycorey/shrimp#18
No description provided.