Re: IF, WHEN or SOME

2018-09-20 Thread Carlo Zancanaro
Hey Stephen, On Fri, Sep 21 2018, Stephen Feyrer wrote: user=> (def some-numbers ‘(2 4 6 8)) #This is my value to test later. #’user/some-numbers At this point we have some-numbers = '(2 4 6 8) user=> (def evens? (partial (when (apply = (map even? some-numbers) #’user/evens? Let's

Re: IF, WHEN or SOME

2018-09-20 Thread Paul Rutledge
did not provide continuations. On Monday, December 11, 2017 at 5:56:29 PM UTC-6, Stephen Feyrer wrote: > > Hi there, > > I have been trying to shake this thought for a while now. Essentially, my > thought was if you can return a function why not decision component of an > IF, WHEN o

Re: IF, WHEN or SOME

2018-09-20 Thread Alan Thompson
Should have been:(evens? nil) On Thu, Sep 20, 2018 at 1:47 PM Alan Thompson wrote: > `println` always returns `nil`. So it prints "one", returns `nil`, and > you try to execute the form: > > (nil) => NullPointerException > > > user=> (evens? (println “one”)) > one > NullPointerException

Re: IF, WHEN or SOME

2018-09-20 Thread Alan Thompson
be worth a watch. >>> >>> On Mon, Dec 11, 2017 at 4:56 PM, Stephen Feyrer < >>> stephen.fey...@gmail.com> wrote: >>> >>>> Hi there, >>>> >>>> I have been trying to shake this thought for a while now. Essentially

Re: IF, WHEN or SOME

2018-09-20 Thread Orestis Markou
tch. >>> >>>> On Mon, Dec 11, 2017 at 4:56 PM, Stephen Feyrer >>>> wrote: >>>> Hi there, >>>> >>>> I have been trying to shake this thought for a while now. Essentially, my >>>> thought was if you can r

Re: IF, WHEN or SOME

2018-09-20 Thread Orestis Markou
>>> wrote: >>> I talked a bit about this in my video on Boolean Blindness: >>> https://www.youtube.com/watch?v=K1LaaJMscCc >>> >>> Might be worth a watch. >>> >>>> On Mon, Dec 11, 2017 at 4:56 PM, Stephen Feyrer >>>

IF, WHEN or SOME

2018-09-20 Thread Stephen Feyrer
gt;>> >>> I have been trying to shake this thought for a while now. Essentially, >>> my thought was if you can return a function why not decision component of >>> an IF, WHEN or SOME statement? That would give you a re-usable named >>> choice. >>> >

Re: IF, WHEN or SOME

2017-12-11 Thread Stephen Feyrer
on, Dec 11, 2017 at 4:56 PM, Stephen Feyrer <stephen.fey...@gmail.com> > wrote: > >> Hi there, >> >> I have been trying to shake this thought for a while now. Essentially, >> my thought was if you can return a function why not decision component of >> an

Re: IF, WHEN or SOME

2017-12-11 Thread Timothy Baldridge
for a while now. Essentially, my > thought was if you can return a function why not decision component of an > IF, WHEN or SOME statement? That would give you a re-usable named choice. > > Then you could write: > > (celebration: do-something do-something-else) > > > This would

IF, WHEN or SOME

2017-12-11 Thread Stephen Feyrer
Hi there, I have been trying to shake this thought for a while now. Essentially, my thought was if you can return a function why not decision component of an IF, WHEN or SOME statement? That would give you a re-usable named choice. Then you could write: (celebration: do-something do-something