Skip to content

Commit

Permalink
adding in shift
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevan Little committed Mar 1, 2013
1 parent ce63b54 commit 030be75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/scala/org/moe/runtime/builtins/ArrayClass.scala
Expand Up @@ -44,6 +44,15 @@ object ArrayClass {
)
)

arrayClass.addMethod(
new MoeMethod(
"shift",
new MoeSignature(),
env,
(e) => e.getCurrentInvocant.get.unboxToList.get(0)
)
)

/**
* List of Methods to support:
* - values
Expand All @@ -56,7 +65,6 @@ object ArrayClass {
* - delete ($index | @indicies)
* - push ($item | @items)
* - pop
* - shift
* - unshift ($item | @items)
* - sort ($sorter)
* - grep ($filter)
Expand Down

0 comments on commit 030be75

Please sign in to comment.