Newest at the top
2024-04-30 20:54:32 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 268 seconds) |
2024-04-30 20:54:12 +0200 | tri | (~tri@ool-18bbef1a.static.optonline.net) |
2024-04-30 20:49:12 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) |
2024-04-30 20:47:42 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
2024-04-30 20:43:00 +0200 | iteratee | (~kyle@162.218.222.207) (Ping timeout: 252 seconds) |
2024-04-30 20:40:37 +0200 | <mauke> | return wraps the result of f |
2024-04-30 20:34:24 +0200 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
2024-04-30 20:34:19 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
2024-04-30 20:32:37 +0200 | tomboy64 | (~tomboy64@user/tomboy64) |
2024-04-30 20:31:36 +0200 | <yin> | MTL: https://www.youtube.com/watch?v=6pDH66X3ClA |
2024-04-30 20:30:41 +0200 | <EvanR> | square peg square hole |
2024-04-30 20:30:10 +0200 | <lambdabot> | Maybe Int |
2024-04-30 20:30:09 +0200 | <EvanR> | :t (Just 'c' >>=) (return . ord) |
2024-04-30 20:29:21 +0200 | <lambdabot> | Monad m => Char -> m Int |
2024-04-30 20:29:20 +0200 | <EvanR> | :t (return . ord) |
2024-04-30 20:29:11 +0200 | <lambdabot> | (Char -> Maybe b) -> Maybe b |
2024-04-30 20:29:10 +0200 | <EvanR> | :t (Just 'c' >>=) |
2024-04-30 20:28:01 +0200 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 268 seconds) |
2024-04-30 20:26:51 +0200 | <monochrom> | Aw, that is not as fun as Maybe [IO Int] :) |
2024-04-30 20:26:01 +0200 | <lambdabot> | Just [Just 7] |
2024-04-30 20:26:00 +0200 | <yin> | > pure . pure . pure $ 7 :: Maybe [Maybe Int] -- justsomeguy |
2024-04-30 20:24:03 +0200 | philopsos | (~caecilius@user/philopsos) |
2024-04-30 20:22:41 +0200 | <monochrom> | Oh, how it type-checks? That's much easier. :) |
2024-04-30 20:21:37 +0200 | tomboy64 | (~tomboy64@user/tomboy64) |
2024-04-30 20:21:27 +0200 | <justsomeguy> | I'm just thinking out loud here.. Since return wraps the argument to f, then f must operate on an unwrapped type. |
2024-04-30 20:21:14 +0200 | tomboy64 | (~tomboy64@user/tomboy64) (Read error: Connection reset by peer) |
2024-04-30 20:16:41 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-30 20:13:01 +0200 | <int-e> | join (fmap (return . f) xs) = join (fmap return (fmap f xs)) = fmap f xs |
2024-04-30 20:12:54 +0200 | <c_wraith> | I'm pretty sure that law is free if the other laws are followed. |
2024-04-30 20:12:45 +0200 | <geekosaur> | the monad laws document the relationship that makes this work |
2024-04-30 20:12:17 +0200 | <yin> | something something lawful instances |
2024-04-30 20:11:46 +0200 | <geekosaur> | (well, in CT >>= doesn't exist; more correctly, that's how you woulddefine it in CT) |
2024-04-30 20:11:04 +0200 | <geekosaur> | in category theory >>= is join + fmap. by applying an identity to one of those operations, you can reconstruct the other; so `return`/`pure` lets you recover `fmap` and `id` lets you recover `join` |
2024-04-30 20:10:49 +0200 | <monochrom> | But if the question is why it is correct, then the answer is it is one of the monad laws. |
2024-04-30 20:10:22 +0200 | <monochrom> | I don't understand the question. You already have an implementation right there. :) |
2024-04-30 20:09:39 +0200 | <justsomeguy> | Can someone help me understand how fmap can be implemented in terms of (\f xs -> xs >>= return . f)? |
2024-04-30 20:02:33 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) |
2024-04-30 19:59:02 +0200 | mzschr | (~mzschr@2a07-a880-4603-1035-18b5-1e9f-f698-63a6.pool6.ovpn.com) (Quit: Client closed) |
2024-04-30 19:59:02 +0200 | euleritian | (~euleritia@77.22.252.56) |
2024-04-30 19:58:17 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-30 19:57:35 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 264 seconds) |
2024-04-30 19:56:13 +0200 | destituion | (~destituio@2a02:2121:340:2456:fffe:d0f:7737:dd1) |
2024-04-30 19:55:37 +0200 | rvalue | (~rvalue@user/rvalue) |
2024-04-30 19:55:07 +0200 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2024-04-30 19:52:49 +0200 | glguy | (g@libera/staff/glguy) |
2024-04-30 19:51:34 +0200 | glguy | (g@libera/staff/glguy) (Quit: Quit) |
2024-04-30 19:48:33 +0200 | raym | (~ray@user/raym) (Ping timeout: 268 seconds) |
2024-04-30 19:48:28 +0200 | destituion | (~destituio@85.221.111.174) (Ping timeout: 260 seconds) |
2024-04-30 19:45:50 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-04-30 19:45:24 +0200 | euleritian | (~euleritia@77.22.252.56) (Read error: Connection reset by peer) |