Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #39 from Youngestdev/master
Browse files Browse the repository at this point in the history
Added more blocks to the List module
  • Loading branch information
Thecarisma authored Oct 9, 2018
2 parents 5948e11 + 9b38db0 commit 49b70c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/simple/core/List.sim
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,19 @@ class List : Object
__OBJECT + arr[a]
end
return __OBJECT

/* Returns the first element of the List */

block first()
return __OBJECT[0]
end

/* Returns the last element in the List */

block last()
return __OBJECT[lengthOf(__OBJECT)]
end

/*
* Error block, needs to be private
* So it won't be be accessed outside
Expand Down

0 comments on commit 49b70c2

Please sign in to comment.