Permalink
Browse files

Cleaning up my explanation of fold

  • Loading branch information...
1 parent bb0ff77 commit 844dda6f93b06d9707bf1148bf1c250b9731b6fe @stevej committed Oct 11, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 docs/thoughts_on_fold.md
@@ -9,18 +9,18 @@ functional combinators.
see how this expands in a small program that adds some chars together
into a string.
-`["b" "c" "d"] "a" [concat] fold` (expand `fold`)
+`["b" "c" "d"] "a" [concat] fold`
-`["b" "c" "d"] "a" [concat] swapd step` (expand `swapd`)
+`["b" "c" "d"] "a" [concat] swapd step` (expanded `fold`)
-`[concat] ["b" "c" "d"] "a" step`
+`[concat] ["b" "c" "d"] "a" step` (expanded `swapd`)
-The `step` combinator machinery here peels off elements from the head
-of the array and executes the contents of the quotation. I'm hiding
-the `["b" "c" "d"]` array, it's not not available directly to your
-quotation, rather it's elements are peeled off the head (the left
-side) and put on the stack. the results of concat plus the next
-element are what's on top of the stack for the quotation to work with.
+The `step` combinator peels off elements from the head of the array
+and executes the contents of the quotation. I'm hiding the `["b" "c"
+"d"]` array, it's not not available directly to your quotation, rather
+it's elements are peeled off the head (the left side) and put on the
+stack. the results of concat plus the next element are what's on top
+of the stack for the quotation to work with.
Back to our rewriting

0 comments on commit 844dda6

Please sign in to comment.