Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/array #1

Merged
merged 27 commits into from
Feb 26, 2024
Merged

Feat/array #1

merged 27 commits into from
Feb 26, 2024

Conversation

yazaldefilimone
Copy link
Owner

>> let cal = fn(num) { num * 2 }
>> let nunn = [10, cal(20), 0, "hello", fn(l) { l + 1000}]
>> nunn[0]
10

>> nunn[len(nunn)]
ERROR: argument to `len` not supported, got ARRAY

>> nunn[10]
nil

>> nunn[3]
hello

>> nunn[4]
fn(l){(l + 1000)}

>> nunn[4]
fn(l){(l + 1000)}

>> nunn[4]
fn(l){(l + 1000)}

>> nunn[4]
fn(l){(l + 1000)}

>> nunn[4](10)
1010

>> nunn[4](200)
1200

>> nunn[2]()
ERROR: Not a function: INTEGER

>> nunn[2]
0

>> nunn
10, 40, 0, hello, fn(, l){(l + 1000)}

>> nunn[2]
0

>> nunn[1]
40

@yazaldefilimone yazaldefilimone merged commit 3e5582e into main Feb 26, 2024
@yazaldefilimone yazaldefilimone deleted the feat/array branch February 26, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant