Newest at the top
2024-10-02 16:29:28 +0200 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 272 seconds) |
2024-10-02 16:28:12 +0200 | <EvanR_> | :horror: |
2024-10-02 16:28:04 +0200 | <lambdabot> | (Traversable t, Applicative f, Show a1, FromExpr (f a2)) => t a1 -> f (t a2) |
2024-10-02 16:28:03 +0200 | <EvanR_> | :t sequenceA . fmap f |
2024-10-02 16:27:51 +0200 | <lambdabot> | (Traversable ((->) (f a1)), Applicative f) => (a1 -> a2) -> f (f a1 -> a2) |
2024-10-02 16:27:50 +0200 | <EvanR_> | :t sequenceA . fmap |
2024-10-02 16:27:44 +0200 | <EvanR_> | they already generalized it to undercut the argument |
2024-10-02 16:27:26 +0200 | <lambdabot> | (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) |
2024-10-02 16:27:24 +0200 | <EvanR_> | :t mapM |
2024-10-02 16:26:45 +0200 | codaraxis__ | (~codaraxis@user/codaraxis) Codaraxis |
2024-10-02 16:26:01 +0200 | <EvanR_> | traverse is doubly generalized mapM |
2024-10-02 16:25:49 +0200 | acidsys | (~crameleon@openSUSE/member/crameleon) crameleon |
2024-10-02 16:24:10 +0200 | YaShhhh | (~YaShhhh@202.43.120.115) |
2024-10-02 16:22:33 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
2024-10-02 16:19:15 +0200 | machinedgod | (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 265 seconds) |
2024-10-02 16:19:11 +0200 | codaraxis | (~codaraxis@user/codaraxis) Codaraxis |
2024-10-02 16:18:39 +0200 | codaraxis___ | (~codaraxis@user/codaraxis) (Ping timeout: 246 seconds) |
2024-10-02 16:17:13 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-10-02 16:16:39 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2) |
2024-10-02 16:07:03 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
2024-10-02 16:05:20 +0200 | athan | (~athan@syn-098-153-145-140.biz.spectrum.com) (Ping timeout: 252 seconds) |
2024-10-02 16:02:29 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-10-02 16:02:02 +0200 | bionade24 | (~quassel@2a03:4000:33:45b::1) bionade24 |
2024-10-02 16:02:01 +0200 | bionade24_ | (~quassel@2a03:4000:33:45b::1) (Remote host closed the connection) |
2024-10-02 16:01:21 +0200 | acidsys | (~crameleon@openSUSE/member/crameleon) (Ping timeout: 248 seconds) |
2024-10-02 16:01:09 +0200 | ljdarj1 | ljdarj |
2024-10-02 16:00:24 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
2024-10-02 16:00:23 +0200 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 245 seconds) |
2024-10-02 15:59:13 +0200 | <lortabac> | I can't think of a more handwaivy explanation than this one :) |
2024-10-02 15:58:51 +0200 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2024-10-02 15:58:43 +0200 | ljdarj | (~Thunderbi@user/ljdarj) (Read error: Connection reset by peer) |
2024-10-02 15:58:43 +0200 | <lortabac> | but since 'fetchUserByID' is an IO action you need (traverse fetchUserByID userIds) |
2024-10-02 15:57:50 +0200 | <lortabac> | if it was a pure computation you would do (map fetchUserByID userIds) |
2024-10-02 15:57:20 +0200 | <lortabac> | immagine you have a list of user ID's and want to fetch the corrisponding users from the database |
2024-10-02 15:57:09 +0200 | codaraxis__ | (~codaraxis@user/codaraxis) (Ping timeout: 248 seconds) |
2024-10-02 15:56:32 +0200 | codaraxis___ | (~codaraxis@user/codaraxis) Codaraxis |
2024-10-02 15:55:33 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-10-02 15:54:54 +0200 | <lortabac> | __monty__: you can think of 'traverse' as an 'fmap' in which the function is not pure but includes an Applicative "effect" |
2024-10-02 15:54:01 +0200 | codaraxis | (~codaraxis@user/codaraxis) Codaraxis |
2024-10-02 15:52:19 +0200 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
2024-10-02 15:51:49 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
2024-10-02 15:50:27 +0200 | codaraxis__ | (~codaraxis@user/codaraxis) Codaraxis |
2024-10-02 15:49:14 +0200 | <Rembane> | But in a handwavy way: it's fmap and then sequence because I need to change swap f and t |
2024-10-02 15:48:32 +0200 | <Rembane> | That one didn't help. :D |
2024-10-02 15:48:21 +0200 | <lambdabot> | (Traversable ((->) (m a1)), Monad m) => (a1 -> a2) -> m (m a1 -> a2) |
2024-10-02 15:48:20 +0200 | <Rembane> | :t sequence . fmap |
2024-10-02 15:48:07 +0200 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
2024-10-02 15:48:06 +0200 | <Rembane> | :t fmap |
2024-10-02 15:48:02 +0200 | <lambdabot> | (Traversable t, Monad m) => t (m a) -> m (t a) |
2024-10-02 15:48:01 +0200 | <Rembane> | :t sequence |