[elm-discuss] Re: Decoding childNodes textContent

2016-12-08 Thread Laurence Roberts
For anyone who comes across this, see this PR - https://github.com/elm-lang/core/pull/768 On Thursday, 24 November 2016 23:58:27 UTC, Laurence Roberts wrote: > > I've become stumped by a json decode issue where the code compiles > correctly but does not appear to actually run.

[elm-discuss] Decoding childNodes textContent

2016-11-24 Thread Laurence Roberts
I've become stumped by a json decode issue where the code compiles correctly but does not appear to actually run. If you run this code below, open your console, enter anything in the editable element and click out of it. I would expect the message `"Write!"` to be logged but it is not. Equally

[elm-discuss] Re: Split a list into a list of lists with a comparator

2016-11-12 Thread Laurence Roberts
list > > > > > main = > [1,2,3] > |> splitWith ((==) 2) > |> toString > |> text > > Hey! Just wanted to post my solution (let me know if there is a bug!). > Thanks for the fun problem :) > > > > On Saturday, November 12, 2016 a

[elm-discuss] Split a list into a list of lists with a comparator

2016-11-12 Thread Laurence Roberts
How would you write this function: splitWith : (a -> Bool) -> List a -> List (List a) such that this is true: splitWith (\x -> x == 2) [1,2,3,4,2,5,6,7] == [[1],[3,4],[5,6,7]] It's clear how to would do it in non-FP but I'm struggling to visualise it in FP, it's been a little while since I've