Skip to content

Commit c4cb35b

Browse files
committed
initial commit
0 parents  commit c4cb35b

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

modules/for-loop.lp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var for = fun(arr, cb) {
2+
var index = 0
3+
4+
while(index < len(arr) - 1) {
5+
cb(index, arr[index])
6+
var index = index + 1
7+
}
8+
}
9+
10+
export for

std.lp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import "./modules/for-loop.lp" as for
2+
3+
export {
4+
"for": for
5+
}

0 commit comments

Comments
 (0)