nodeschool / cincinnati

NodeSchool chapter for Cincinnati.
23 stars 2 forks source link

2015/11/11 Functional Javascript Workshop #18

Closed jackboberg closed 8 years ago

jackboberg commented 8 years ago

Please let us know what you liked, how we can improve, or feel free to ask follow up questions if you are still working through the workshopper.

w3irdrobot commented 8 years ago

I really like the workshopper modules. It's good to get our hands dirty on real problems. With that said, I think it would have been beneficial to get a primer on what functional programming is before diving in headfirst. Also, if someone could please give me a good explanation on what the hell a trampoline is, that would be great. All the stuff I found online isn't all that clear, at least to me.

jackboberg commented 8 years ago

@searsaw Thanks for the feedback, I totally agree on introduction content. I was not as prepared as I would like to have been. I would love to schedule another event specifically for this workshopper and plan on maybe a full hour group discussion before starting about functional programming in general, and it's application in node.js in particular.

The trampoline exercise definitely threw me at first as well. Here is what wikipedia offers, which probably doesn't help much.

I think about the trampoline function like this:

You jump once on a trampoline, and the trampoline continues to bounce you until it runs out of whatever initial energy you gave it.

You call a trampoline function (initial jump), passing it a function that when called executes its routine (float) and returns the next function to execute (bounce), and the trampoline function continues executing those functions until it runs out of functions to call.

jackboberg commented 8 years ago

Another attempt at trampoline explanation:

If you understand a waterfall pattern, where the result of each function is passed to the next function in the waterfall, this is similar. Except instead of yielding a result to a predefined set of steps, each step returns the next step. The 'waterfall' is done, when the last step does not yield the next step.

ghost commented 8 years ago

Good job, Jack!

-----Original Message----- From: "Jack Boberg" notifications@github.com Sent: ‎2/‎19/‎2016 11:58 AM To: "nodeschool/cincinnati" cincinnati@noreply.github.com Subject: Re: [cincinnati] 2015/11/11 Functional Javascript Workshop (#18)

Closed #18. — Reply to this email directly or view it on GitHub.