Newest at the top
2025-01-31 08:09:40 +0100 | <dminuoso> | Sorry, that second one should have read `instance Functor (State _ s)` |
2025-01-31 08:09:23 +0100 | <dminuoso> | So consider `instance Functor (State s)`, we cannot write `instance Functor (State _ a)`, so we reorder the types accordingly. |
2025-01-31 08:08:47 +0100 | <euouae> | right, for State. but why state? |
2025-01-31 08:08:29 +0100 | <dminuoso> | The type order is often influenced by typeclasses you want to satisfy. |
2025-01-31 08:08:05 +0100 | anpad | (~pandeyan@user/anpad) (Quit: ZNC 1.8.2 - https://znc.in) |
2025-01-31 08:07:58 +0100 | <dminuoso> | euouae │ why is `State s a` but `state :: a -> (a, s)`? the order is reversed |
2025-01-31 08:06:03 +0100 | AlexZenon | (~alzenon@5.139.233.186) |
2025-01-31 08:05:23 +0100 | <euouae> | that's true, but then how do you produce the infinite list? like (x : f rest)? |
2025-01-31 08:03:19 +0100 | AlexNoo | (~AlexNoo@178.34.150.8) (Ping timeout: 260 seconds) |
2025-01-31 08:02:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-01-31 08:02:00 +0100 | AlexZenon | (~alzenon@178.34.150.8) (Ping timeout: 246 seconds) |
2025-01-31 08:01:09 +0100 | AlexNoo_ | (~AlexNoo@5.139.233.186) |
2025-01-31 07:55:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-31 07:54:59 +0100 | <ski> | you could just pass on the filtered list in an accumulator parameter of a recursive function |
2025-01-31 07:54:35 +0100 | <ski> | cycle [x] = repeat x |
2025-01-31 07:52:03 +0100 | anpad | (~pandeyan@user/anpad) anpad |
2025-01-31 07:48:36 +0100 | <euouae> | I couldn't figure out if it could be done with list comprehension |
2025-01-31 07:48:19 +0100 | <euouae> | I'm happy with how this turned out, looks very natural |
2025-01-31 07:47:44 +0100 | <euouae> | and I implemented eratosthenes sieve: <https://paste.tomsmeding.com/vm6F8jXA> |
2025-01-31 07:47:37 +0100 | <euouae> | heh, cool. I didn't expect to use the State monad so soon after I learned about it but the leetcode problem needed a list of primes |
2025-01-31 07:45:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-01-31 07:42:25 +0100 | tv | (~tv@user/tv) (Read error: Connection reset by peer) |
2025-01-31 07:42:24 +0100 | tomboy64 | (~tomboy64@user/tomboy64) tomboy64 |
2025-01-31 07:40:05 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-31 07:38:45 +0100 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 248 seconds) |
2025-01-31 07:36:58 +0100 | CiaoSen | (~Jura@2a05:5800:263:8800:ca4b:d6ff:fec1:99da) CiaoSen |
2025-01-31 07:36:53 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-01-31 07:33:23 +0100 | euleritian | (~euleritia@dynamic-176-006-140-003.176.6.pool.telefonica.de) |
2025-01-31 07:33:09 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2025-01-31 07:32:37 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-01-31 07:29:09 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-01-31 07:28:54 +0100 | Square2 | (~Square4@user/square) (Ping timeout: 260 seconds) |
2025-01-31 07:26:35 +0100 | alp | (~alp@2001:861:8ca0:4940:465c:30a2:2211:b30f) |
2025-01-31 07:26:18 +0100 | alp | (~alp@2001:861:8ca0:4940:465c:30a2:2211:b30f) (Remote host closed the connection) |
2025-01-31 07:24:48 +0100 | Square | (~Square@user/square) Square |
2025-01-31 07:24:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-31 07:24:06 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2025-01-31 07:15:48 +0100 | ft | (~ft@p3e9bcd97.dip0.t-ipconnect.de) (Quit: leaving) |
2025-01-31 07:13:43 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-01-31 07:09:19 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-31 07:04:50 +0100 | monochrm | monochrom |
2025-01-31 07:04:50 +0100 | monochrom | (trebla@216.138.220.146) (Ping timeout: 244 seconds) |
2025-01-31 07:03:32 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 252 seconds) |
2025-01-31 07:03:22 +0100 | monochrm | (trebla@216.138.220.146) |
2025-01-31 07:01:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-01-31 06:57:07 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-31 06:55:55 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-01-31 06:55:29 +0100 | tnt2 | tnt1 |
2025-01-31 06:55:29 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 260 seconds) |
2025-01-31 06:55:23 +0100 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |