Good to know!
By the way, is the original code you were working on part of an open-source
library, by any chance? I'm working on some 2D/3D geometric libraries for
Elm myself, including stuff like bounding boxes and spatial trees much like
the one you describe. Might would be worth seeing if
Nah, trampoline takes some mental gymnastics! Hope it's helpful for your tree
problem.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I haven't tried it, but they list Elm as one of their supported languages
on the main page, which is also some nice exposure for us.
As usual, it's free to use with open-source projects.
https://dependencyci.com/
--
You received this message because you are subscribed to the Google Groups "Elm
*sigh* Never mind, I am being dumb.
factorial : Int -> Int
factorial x =
Trampoline.evaluate (fac 1 x)
fac : Int -> Int -> Trampoline Int
fac acc n =
if n <= 0 then
Trampoline.done acc
else
Trampoline.jump (\_ -> fac (n * acc) (n - 1))
On Tue, Jul 12, 2016 at 9:17
... and I have no idea how this is supposed to work. Even for primitive
recursion
factorial : Int -> Int
factorial x =
Trampoline.evaluate (fac x)
fac : Int -> Trampoline Int
fac x =
if x <= 0 then
Trampoline.done 1
else
Trampoline.jump
(\_ ->
Ian, that is a great thought, but even if we split the list exactly in
half, the call stack fills up when the list length gets to around 4500.
partition _ list =
let
n = List.length list // 2
in
(List.take n list, List.drop n list)
In my specific problem, the "wrap" function finds
at the end Elm mentions the technical similarity between Elm & Erlang -
pity they didn't talk more about that...
On Tue, 12 Jul 2016 at 13:48 Luis Arias wrote:
> Nice! Thanks!
>
> On Mon, Jul 11, 2016 at 9:05 PM, John Orford
> wrote:
>
>> Great
Nice! Thanks!
On Mon, Jul 11, 2016 at 9:05 PM, John Orford wrote:
> Great interview
>
>
> https://soundcloud.com/elixirfountain/elixir-fountain-evan-czaplicki-2016-07-11
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss"
but is there anything ever a type?
I mean, of course everything in elm HAS a type but you cannot pass around
types and you cannot use them in any way (interrogate, compose) .
On Tue, Jul 12, 2016 at 2:25 PM, John Orford wrote:
> even values are functions (if we squint
even values are functions (if we squint hard enough and think about church
numerals etc. : )
so I would just amend, "everything's" a type or a function
On Tue, 12 Jul 2016 at 12:26 Peter Damoc wrote:
> I think you can reuse Haskell's generalization: "everything is a function"
Using the mental model "everything is a" [1] as a way to generalise
something how would you define Elm?
[1] - http://c2.com/cgi/wiki?EverythingIsa
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop
Hi, I've built a couple of projects now using Phoenix and Elm, but both
quickly started misbehaving in that the file watchers were not picking up
changes properly and causing recompilation. I'm thinking of substituting in
Gulp next time as I know it is reliable, but wanted to see whether I have
Sorry, please let me adjust my previous comment.
I said React+Elm is too large, but now I found it's NOT so large as I
thought.
(Of course not as small as lightweight libraries yet)
I just saw the number at TodoMVC.
elm.js: 69.7 KB gziped
(including all user code)
react-with-addons.js: 174 KB
If you look here:
https://github.com/elm-lang/navigation/blob/master/examples/Counter.elm#L42
you can see that it's using the .hash part of the Location.
If you look here:
http://package.elm-lang.org/packages/elm-lang/navigation/1.0.0/Navigation#Location
I'm sure you will find what you need.
;)
14 matches
Mail list logo