Skip to content

Commit

Permalink
Implement step 7
Browse files Browse the repository at this point in the history
  • Loading branch information
wasamasa committed Jul 30, 2016
1 parent aa0ac94 commit 34f7b3d
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chuck/core.ck
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public class Core
"=", "<", "<=", ">", ">=",
"pr-str", "str", "prn", "println",
"read-string", "slurp",
"atom", "atom?", "deref", "reset!", "swap!"] @=> Core.names;
"atom", "atom?", "deref", "reset!", "swap!",
"cons", "concat"] @=> Core.names;
MalSubr ns[0] @=> Core.ns;

new MalAdd @=> Core.ns["+"];
Expand Down Expand Up @@ -41,3 +42,6 @@ new MalIsAtom @=> Core.ns["atom?"];
new MalDeref @=> Core.ns["deref"];
new MalDoReset @=> Core.ns["reset!"];
new MalDoSwap @=> Core.ns["swap!"];

new MalCons @=> Core.ns["cons"];
new MalConcat @=> Core.ns["concat"];
24 changes: 24 additions & 0 deletions chuck/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,27 @@
`eval`? What about `swap!`?
- It would be useful to mention that `swap!` sort of requires
implementing `apply` first...

# Step 7

- Why the scare quotes for splicing?
- "Before implementing the quoting forms, you will need to implement
some supporting functions in the core namespace:" should be one list
item
- "this function takes a list as its second parameter and returns a
new list that has the first argument prepended to it." reads backwards
- The quasiquote paragraph is hard to read
- It's rather confusing to refer to the argument of `ast` and to an
`ast` parameter, perhaps name the latter a form?
- What could also help would be a visualization of the four
conditionals:
- \`42, \`()
- \`~foo
- \`(~@foo) and more
- \`(42 ~@foo) and everything else
- Mal/mal is inconsistently capitalized
- "Expand the conditional with reader `read_form` function to add the
following four cases" is again weird, better refer to the
`read_form` function in reader.qx
- "concat should support concatenation of lists, vectors, or a mix or
both." <- "or a mix or both" is redundant
Loading

0 comments on commit 34f7b3d

Please sign in to comment.