On Saturday, 29 September 2018 at 01:40:34 UTC, Robby Marki wrote:
On Friday, 28 September 2018 at 14:02:48 UTC, aliak wrote:
Hi,

I've been working for fun on a library [0] that is inspired by a library from the javascript world called lodash [1]. I basically liked the flexibility and thought I'd try and implement a few things as it was about the time I started learning D. It basically tried to do the same with algorithms as in lodash but adds the usage of Optional!T and Expect!(T, U) as ways to returns results.

[...]

In this example
https://aliak00.github.io/ddash/ddash/functional/try_.html

where does the match function come from?
I get this error when trying to compile:
onlineapp.d(16): Error: no property match for type int
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/iteration.d(500):        
instantiated from here: MapResult!(__lambda1, int[])
onlineapp.d(15):        instantiated from here: map!(int[])

Haha ok I'm a bit stumped right now. That example is wrong, so you get the correct error, but it actually compiles on me machine right now.

I changed Try.front to return the expected return value of a tryable function. And in that example that would clearly be an int. So there is no "match" on type int is what I should be seeing as well. But for some reason that I'm going to have to dig in to, it's compiling a running in the actual project code O_o.


Reply via email to