Skip to content

Commit

Permalink
Pass 2
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Oct 10, 2024
1 parent 4de2c13 commit 52190af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions impls/scala/step2_eval.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import types.{MalList, _list_Q, MalVector, MalHashMap, Func}
import types.{MalList, _list_Q, MalVector, MalHashMap}

object step2_eval {
// read
Expand Down Expand Up @@ -31,7 +31,7 @@ object step2_eval {
case first :: rest => {
// function call
EVAL(first, env) match {
case fn: Func => {
case fn: (List[Any] => Any) => {
val el = rest.map(EVAL(_, env))
return fn(el)
}
Expand Down
4 changes: 2 additions & 2 deletions impls/scala/step3_env.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import types.{MalList, _list_Q, MalVector, MalHashMap, Func}
import types.{MalList, _list_Q, MalVector, MalHashMap}
import env.Env

object step3_env {
Expand Down Expand Up @@ -47,7 +47,7 @@ object step3_env {
case first :: rest => {
// function call
EVAL(first, env) match {
case fn: Func => {
case fn: (List[Any] => Any) => {
val el = rest.map(EVAL(_, env))
return fn(el)
}
Expand Down

0 comments on commit 52190af

Please sign in to comment.