2025/02/05

Newest at the top

2025-02-05 07:53:51 +0100 <albet70> like in traverse (\x -> if x ==0 then Nothing else Just (1/x)) [1,2,3,0,4], I want the sunccess part result
2025-02-05 07:53:47 +0100acidjnk_new3(~acidjnk@p200300d6e7283f01d9acb33bf68493bd.dip0.t-ipconnect.de) acidjnk
2025-02-05 07:52:41 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 07:50:54 +0100ephilalethes(~noumenon@2404:c0:2020::55a:6e53) noumenon
2025-02-05 07:49:58 +0100 <int-e> To what end? It's just horribly confusing, throw it out.
2025-02-05 07:49:35 +0100 <albet70> how to fix that code?
2025-02-05 07:49:11 +0100 <lambdabot> (Fractional b, Eq b) => [b] -> [b]
2025-02-05 07:49:10 +0100 <int-e> :t map recip . takeWhile (/= 0)
2025-02-05 07:48:42 +0100 <int-e> the accumulated value might just as well not exist; `mapK` never uses it.
2025-02-05 07:48:10 +0100 <albet70> early return with accumulated value
2025-02-05 07:47:55 +0100 <lambdabot> (Fractional b, Eq b) => [b] -> [b]
2025-02-05 07:47:55 +0100 <int-e> :t map recip . filter (/= 0)
2025-02-05 07:47:49 +0100 <albet70> I want [1,0.5,0.333,0] not Nothing
2025-02-05 07:47:18 +0100 <lambdabot> Nothing
2025-02-05 07:47:16 +0100 <albet70> > traverse (\x -> if x ==0 then Nothing else Just (1/x)) [1,2,3,0,4]
2025-02-05 07:46:57 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-02-05 07:42:27 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 07:41:16 +0100 <Axman6> albet70: I would recommend walking through evaluating it yourself by hand. start with rec [1,2,3,0,4] [] id, expand it to (\ls -> \accum -> \k -> ...) [1,2,3,0,4] [] id, substitute in the arguments, then iterate your definition of mapK
2025-02-05 07:34:12 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-05 07:32:18 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2025-02-05 07:29:46 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-05 07:28:27 +0100 <haskellbridge> <thirdofmay18081814goya> jackdk: lots of material on this, thanks a lot for the reference!
2025-02-05 07:27:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 07:24:57 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2025-02-05 07:24:14 +0100_ht(~huub@62.250.52.179) (Remote host closed the connection)
2025-02-05 07:23:32 +0100 <albet70> I want accum store the previous computed values and return with k
2025-02-05 07:23:00 +0100 <albet70> why this accum is empty in above code
2025-02-05 07:22:46 +0100 <albet70> https://paste.tomsmeding.com/lzecPvyN
2025-02-05 07:22:44 +0100takuan(~takuan@d8D86B601.access.telenet.be)
2025-02-05 07:19:23 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden
2025-02-05 07:16:59 +0100hgolden(~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Remote host closed the connection)
2025-02-05 07:16:35 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-05 07:12:11 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 07:08:57 +0100 <jackdk> thirdofmay18081814goya: I don't know the literature but you might want to try looking at categorical presentations of profunctor optics
2025-02-05 07:08:05 +0100 <albet70> how to store computed value in iteration compute?
2025-02-05 07:04:54 +0100tnt2tnt1
2025-02-05 07:04:54 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 260 seconds)
2025-02-05 07:04:10 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-05 07:01:12 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-05 06:56:49 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 06:47:53 +0100michalz(~michalz@185.246.207.203)
2025-02-05 06:46:53 +0100xff0x(~xff0x@2404:7a85:a201:8600:6e59:82a6:334a:c830) (Ping timeout: 252 seconds)
2025-02-05 06:45:57 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-05 06:45:48 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-05 06:41:42 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-05 06:41:25 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 06:33:20 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-05 06:26:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 06:22:13 +0100tavare(~tavare@user/tavare) (Remote host closed the connection)
2025-02-05 06:15:44 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)