annotate paste/paste.17882 @ 12246:f3be034784d0 draft

<b_jonas> addwhatis brachylog(1egobot) - Brachylog, a Prolog-like golf language
author HackEso <hackeso@esolangs.org>
date Thu, 05 Dec 2019 23:44:34 +0000
parents 964d6cdb2609
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2752
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
1 2008-02-21.txt:22:54:08: <oerjan> that is: fmap fst (minViewWithKey . snd . split currentLineNo $ currentProgram). i think.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
2 2008-06-07.txt:04:25:30: <augur> positive == return, happy == fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
3 2008-06-07.txt:04:26:14: <augur> happy is fmap i think
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
4 2008-06-07.txt:04:27:58: <augur> happy has to be fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
5 2008-06-07.txt:04:29:32: <augur> fmap is (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
6 2008-06-07.txt:04:29:46: <augur> fmap is (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
7 2008-10-26.txt:00:12:07: <Asztal> I think it definitely makes things more readable in the case of things like `isPrefixOf` and maybe `fmap`
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
8 2009-02-16.txt:17:25:38: <ehird> > loeb x = fmap (\a -> a (loeb x)) x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
9 2009-02-27.txt:18:15:46: <ehird> 18:15 ehird: @pl fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
10 2009-02-27.txt:18:15:46: <ehird> 18:15 lambdabot: fmap (fmap (fmap fmap)) fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
11 2009-02-27.txt:18:15:50: <ehird> fmap calculus
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
12 2009-02-27.txt:18:16:25: <ais523> what does fmap do?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
13 2009-02-27.txt:18:16:37: <ehird> 18:15 ehird: :t fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
14 2009-02-27.txt:18:16:38: <oerjan> adding 4 fmaps gives the same after a while
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
15 2009-02-27.txt:18:16:49: <ehird> for which fmap = (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
16 2009-02-27.txt:18:17:00: <ehird> for which fmap = map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
17 2009-02-27.txt:18:17:17: <ehird> ideally, map and (.) wouldn't exist and fmap would be called (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
18 2009-02-27.txt:18:17:54: <oerjan> fmap = liftM for monads
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
19 2009-02-27.txt:18:18:04: <ehird> lambdabot used to have (.) as fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
20 2009-02-27.txt:18:18:58: <ehird> 18:17 HugoDaniel has left IRC ("fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap vim")
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
21 2009-02-27.txt:18:19:41: <ehird> ehird: @. type pl fmap . fmap . fmap fmap fmap fmap (fmap . fmap fmap) . fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
22 2009-03-24.txt:17:08:31: <ehird> "Or even how to implement Haskell's ap/<*> (translated painstakingly to Java) in terms of fmap, return, and join (this is legally considered torture in 49 states)"
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
23 2009-04-10.txt:20:58:46: <Deewiant> ehird: fmap (Const . read) (many1 digit)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
24 2009-05-15.txt:20:28:14: <Deewiant> findFixPoint f = fmap snd . find (uncurry (==)) . (zip `ap` tail) . iterate f
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
25 2009-06-23.txt:20:36:36: <ehird> @pl \x -> foo `fmap` bar x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
26 2009-06-23.txt:20:36:37: <lambdabot> (foo `fmap`) . bar
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
27 2009-06-24.txt:15:18:37: <Warrigal> <*> looks like fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
28 2009-06-24.txt:15:22:31: <Warrigal> s/map/fmap/
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
29 2009-06-24.txt:15:27:09: <lambdabot> f <$> a = fmap f a
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
30 2009-06-24.txt:15:27:28: <Warrigal> Woo, it's fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
31 2009-06-24.txt:18:00:14: <ehird> pikhq: also, "fmap" is both (.) and map, for functions and lists
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
32 2009-06-24.txt:18:00:16: <ehird> > fmap succ [1,2,3]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
33 2009-06-24.txt:18:00:23: <ehird> > fmap (fmap succ succ) [1,2,3]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
34 2009-06-24.txt:19:15:27: <oerjan> l >>= f = join (fmap f l)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
35 2009-06-24.txt:19:16:12: <oerjan> fmap = map, since the functor instances agree (parametricity makes it hard/impossible to have more than one Functor instance)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
36 2009-06-24.txt:19:16:32: <Gracenotes> I'm pretty sure fmap [] has one sane instance :)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
37 2009-06-25.txt:16:31:39: <ehird> :t fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
38 2009-06-25.txt:16:31:51: <ehird> but that's what fmap is :P
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
39 2009-06-25.txt:16:36:58: <ehird> @src (->) fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
40 2009-06-25.txt:16:36:58: <lambdabot> fmap = (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
41 2009-06-25.txt:16:38:20: <pikhq> I know you can use fmap in order to confuse people instead of ., though...
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
42 2009-06-25.txt:16:38:41: <ehird> pikhq: it is the opinion of many that map and (.) should not exist, and that fmap should be called (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
43 2009-06-26.txt:01:09:10: <oerjan> !haskell import System.Random; main = sequence_ . replicate 200 $ fmap (putStr . (["hurf","durf","hurd"]!!)) randomRIO (0,2)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
44 2009-06-26.txt:05:24:26: <pikhq> > fmap ord ['\0'..]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
45 2009-06-26.txt:05:27:58: <pikhq> > fmap chr $ (+) <$> (fmap ord ['\0'..]) <*> cycle [1]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
46 2009-06-26.txt:05:30:49: <pikhq> > fromZipList $ fmap chr $ (+) <$> (fmap ord ['\0'..]) <*> cycle [1]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
47 2009-06-26.txt:05:31:16: <pikhq> > getZipList $ zipList (fmap chr $ (+) <$> (fmap ord ['\0'..])) <*> zipList $ cycle [1]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
48 2009-06-26.txt:05:31:35: <pikhq> > getZipList $ ZipList (fmap chr $ (+) <$> (fmap ord ['\0'..])) <*> ZipList $ cycle [1]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
49 2009-06-26.txt:05:32:21: <immibis> @help fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
50 2009-06-26.txt:05:32:31: <pikhq> > fmap chr $ fmap (+1) $ fmap ord ['\0'..]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
51 2009-06-26.txt:05:33:19: <pikhq> > fmap . fmap . fmap chr (+1) ord ['\0'..]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
52 2009-06-26.txt:05:33:54: <gracenotes> *FMAP* *FMAP* *FMAP* *FMAP* *FMAP* *FMAP*
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
53 2009-06-27.txt:02:16:43: <oerjan> however, m >>= return . f == fmap f m
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
54 2009-06-27.txt:02:18:02: <oerjan> no, fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
55 2009-06-27.txt:02:18:07: <lambdabot> f <$> a = fmap f a
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
56 2009-06-27.txt:02:48:24: <oerjan> = fmap ((*198.838782).(*1079252848.8)) [1..]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
57 2009-07-09.txt:20:00:36: <lambdabot> Data.Traversable fmapDefault :: Traversable t => (a -> b) -> t a -> t b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
58 2009-07-09.txt:20:00:36: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
59 2009-07-12.txt:00:15:15: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
60 2009-07-12.txt:00:15:53: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
61 2009-07-12.txt:00:16:03: <Gracenotes> ..however it takes some time to infer longer fmap chains
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
62 2009-07-12.txt:00:16:14: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
63 2009-07-12.txt:00:17:33: <Gracenotes> oddly enough, it seems that any chain of fmaps always produces djinn functions in the original order
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
64 2009-07-12.txt:00:17:54: <ehird> :t t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
65 2009-07-12.txt:00:18:07: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
66 2009-07-12.txt:00:18:13: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
67 2009-07-12.txt:00:18:18: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
68 2009-07-12.txt:00:19:16: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
69 2009-07-12.txt:00:19:40: <ehird> :t fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
70 2009-07-12.txt:00:19:41: <pikhq> I'm renaming fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
71 2009-07-12.txt:00:20:38: <ehird> :t let (.) = fmap in (.) . . (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
72 2009-07-12.txt:00:20:43: <ehird> :t let (.) = fmap in (.) . (. (.))
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
73 2009-07-12.txt:00:21:05: <ehird> :t let (.) = fmap in (.) . (. (.)) . (((.) . ((.) . (.)) .) . ((.) .) . (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
74 2009-07-12.txt:00:21:29: <Gracenotes> me no likey (.) = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
75 2009-07-12.txt:00:21:31: <ehird> :t let (.) = fmap in (.) . ((.)) . ( ((.) . ((.) . (.)) .) . ((.) .)) . (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
76 2009-07-12.txt:00:21:39: <ehird> Gracenotes: but (.) and map are useless; they're just fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
77 2009-07-12.txt:00:21:47: <pikhq> @src (->) fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
78 2009-07-12.txt:00:21:48: <lambdabot> fmap = (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
79 2009-07-12.txt:00:21:54: <ehird> @src [] fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
80 2009-07-12.txt:00:21:54: <lambdabot> fmap = map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
81 2009-07-12.txt:00:22:22: <ehird> @unpl let (.) = fmap in (.) . ((.)) . (((.) . ((.) . (.)) .) . ((.) .)) . (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
82 2009-07-12.txt:00:22:22: <lambdabot> let { (.) = fmap} in (\ z b c f h i l o s -> z (b c f (h i l o s)))
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
83 2009-07-12.txt:00:22:29: <ehird> @unlet let (.) = fmap in (.) . ((.)) . (((.) . ((.) . (.)) .) . ((.) .)) . (.)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
84 2009-07-12.txt:00:24:00: <pikhq> It's like fmap on the monads!
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
85 2009-07-12.txt:01:01:29: <lambdabot> fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
86 2009-07-12.txt:01:09:45: <pikhq> :t ap `fmap` ($)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
87 2009-07-12.txt:20:33:28: <ehird> pikhq: Cale used to have lambdabot lie about stuff. It had (.) = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
88 2009-07-12.txt:20:34:05: <pikhq> fmap should definitely be called fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
89 2009-07-12.txt:20:34:28: <pikhq> It's just a special case of fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
90 2009-07-15.txt:13:25:56: <ehird> > let (.) = fmap in head . words "aalso evel"
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
91 2009-07-16.txt:16:18:31: <lambdabot> Data.Traversable fmapDefault :: Traversable t => (a -> b) -> t a -> t b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
92 2009-07-16.txt:16:18:31: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
93 2009-07-16.txt:16:18:33: <ehird> oh it's fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
94 2009-07-16.txt:18:51:13: <pikhq> @. hoogle t fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
95 2009-07-16.txt:18:51:38: <pikhq> @. hoogle type fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
96 2009-08-15.txt:00:55:24: <pikhq> Now if you had asked about the difference between fmap and functional composition, I could say something.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
97 2009-08-15.txt:00:55:32: <pikhq> Like, say, fmap being a generalisation.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
98 2009-08-17.txt:04:52:36: <ehird> getArgs >>= mapM readFle >>= fmap (map parse)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
99 2009-08-17.txt:04:53:32: <ehird> though (do args <- getArgs; contents <- mapM readFile args; parses <- fmap (map parse)) works too, but is tedious
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
100 2009-08-17.txt:04:54:05: <pikhq> Bah. fmap (map parse) <<= mapM readFile <<= getArgs
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
101 2009-10-03.txt:21:54:47: <pikhq> (/fmap/map/liftM2...)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
102 2009-12-26.txt:13:13:52: <augur> xs >>= (return . f) == fmap f xs
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
103 2009-12-26.txt:13:17:48: <AnMaster> augur, what is fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
104 2009-12-26.txt:13:18:20: <soupdragon> you can define fmap usint >>= and return
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
105 2009-12-26.txt:13:18:45: <augur> fmap is i think probably somethat you can think of as like
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
106 2009-12-26.txt:13:20:06: <augur> and so in order to be a Monad you also have to be a Functor which means you have to have fmap defined.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
107 2009-12-26.txt:13:20:58: <augur> fmap id x = x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
108 2009-12-26.txt:13:21:19: <augur> fmap (f . g) x = fmap f (fmap g x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
109 2009-12-26.txt:13:22:36: <AnMaster> fmap takes a lambda and whatever it is to map over?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
110 2009-12-26.txt:13:22:59: <soupdragon> fmap f m = do x <- m ; return (f x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
111 2010-01-05.txt:16:19:41: <oerjan> it's the same as fmap or <$>
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
112 2010-01-07.txt:01:01:49: <Asztal> (>>=) is SelectMany(), fmap is Select(), return is different for each one.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
113 2010-01-09.txt:16:00:59: <ehird> I wish this were Caleskell and (.) = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
114 2010-01-09.txt:16:01:07: <ehird> Hey, maybe I could just define (.) = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
115 2010-01-09.txt:16:01:10: <Deewiant> You can set (.) = fmap easily
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
116 2010-01-09.txt:16:03:03: <pikhq> Deewiant: Caleskell makes (.)=fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
117 2010-01-09.txt:16:55:46: <ehird> fmap f (Strict a) = strictorlazy (f $! a)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
118 2010-01-09.txt:16:55:46: <ehird> fmap f (Lazy a) = lazy (f a)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
119 2010-01-09.txt:17:04:12: <ehird> fmap f x = pure f <*> x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
120 2010-01-15.txt:17:47:58: <ehird> main = putStr =<< (fmap concat $ getArgs >>= mapM readFile)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
121 2010-01-15.txt:17:53:13: <ehird> main = putStr =<< (fmap (reverse . concat) $ getArgs >>= mapM readFile)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
122 2010-02-06.txt:14:25:07: <ehird> anyway, {| 2 + {3 ÷ x} |} is nicer to write than fmap (2 +) (3 ÷ x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
123 2010-02-06.txt:14:38:27: <ehird> which is even generaler than o = fmap, i think
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
124 2010-02-06.txt:14:38:48: <MissPiggy> fmap and o are quite different thuogh
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
125 2010-02-06.txt:14:39:02: <MissPiggy> fmap should just be map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
126 2010-02-06.txt:14:39:14: <ehird> ok, that doesn't allow . = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
127 2010-02-13.txt:18:06:09: <alise> Functor f a = <fmap : (a -> b) -> f a -> f b>
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
128 2010-02-13.txt:18:07:19: <alise> Functor_List a = <fmap f x = map f x>
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
129 2010-03-07.txt:22:45:57: <alise_> Presumably along the lines of the elimination given by fmap above.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
130 2010-04-02.txt:21:46:27: <pikhq> Functors are objects where fmap makes sense.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
131 2010-04-02.txt:23:13:47: <oerjan> Quadrescence: as of now you only need to implement (>>=) and return to make a Monad. and haskell doesn't currently have a feature that allows you to deduce a _superclass_ method (Functor's fmap) from that, that's what this class something feature would do
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
132 2010-04-05.txt:04:42:35: <oerjan> const () `fmap`
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
133 2010-05-02.txt:23:38:38: <alise__> *Main> fmap biFro [0..10]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
134 2010-05-02.txt:23:42:30: <alise__> *Main> fmap decrush [0..20]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
135 2010-05-08.txt:23:15:03: <alise_> No, a monad is fmap, join and unit!
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
136 2010-06-20.txt:01:29:39: <CakeProphet> I wonder why they didn't just make map and fmap the same function.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
137 2010-06-20.txt:01:36:24: <CakeProphet> I was wondering because the semantics of fmap only applies f to Right values
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
138 2010-06-27.txt:03:32:32: <CakeProphet> ah. fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
139 2010-07-12.txt:23:41:47: <aliseiphone> !haskell :t fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
140 2010-07-12.txt:23:41:48: <EgoBot> fmap fmap fmap :: (Functor ((->) (a -> b)), Functor f1, Functor f) =>
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
141 2010-07-20.txt:21:32:22: <pikhq> AnMaster: It's infix fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
142 2010-07-27.txt:03:26:04: <Mathnerd314> oerjan: x `subset` y = and (fmap (`elem` y) x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
143 2010-08-06.txt:17:52:09: <alise> *Main> fmap fromRational (approxE 10000)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
144 2010-08-09.txt:17:31:31: <alise> fmap id = id
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
145 2010-08-09.txt:17:31:34: <alise> fmap (f.g) = fmap f . fmap g
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
146 2010-08-10.txt:22:51:37: <oerjan> Phantom_Hoover: x >>= return . f = fmap f x (or liftM f x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
147 2010-08-10.txt:22:54:18: <Phantom_Hoover> oerjan, hang on, fmap can work without bind, obviously.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
148 2010-11-02.txt:11:19:21: <elliott> unify (H (Conj xs)) (S (Conj ys)) = fmap concat . sequence $ zipWith unify xs ys
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
149 2010-11-02.txt:11:37:31: <elliott> case catMaybes $ map (\(l,r) -> fmap ((,) r) (unify l x)) ys of
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
150 2010-11-02.txt:11:39:05: <elliott> unify (H (Conj xs)) (S (Conj ys)) = fmap concat . sequence $ zipWith unify xs ys
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
151 2010-11-02.txt:11:45:24: <elliott> case mapMaybe (\(l,r) -> fmap ((,) r) (unify l x)) ys of
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
152 2010-11-30.txt:16:27:04: <elliott> map (\(Rule lhs rhs) -> (rhs,) `fmap` sab lhs t) $ rs
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
153 2010-11-30.txt:17:08:49: <elliott> case catMaybes . map (\(Rule lhs rhs) -> (rhs,) `fmap` sab lhs t) $ rs of
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
154 2010-12-11.txt:21:58:04: <elliott> join . fmap return == id
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
155 2010-12-11.txt:21:58:04: <elliott> join . join == join . fmap join
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
156 2010-12-11.txt:21:58:20: <elliott> oerjan: wait do you need fmap to do a monad? doesn't join/return suffice
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
157 2010-12-11.txt:22:00:32: <Phantom_Hoover> (>>= f) = join (fmap f), yes?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
158 2010-12-11.txt:22:18:00: <elliott> hm so wait how do you do bind in terms of fmap and join?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
159 2010-12-11.txt:22:18:10: <elliott> x >>= f = join (fmap f x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
160 2010-12-11.txt:22:23:26: <Phantom_Hoover> Indeed, (>>=) = flip $ join . fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
161 2010-12-11.txt:22:25:45: <oerjan> (>>=) = flip $ (join .) . fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
162 2010-12-11.txt:22:27:03: <Phantom_Hoover> bind = (join .) . flip fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
163 2010-12-11.txt:22:30:26: <Phantom_Hoover> elliott, how's fmap defined for Tree?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
164 2010-12-11.txt:22:48:04: <Phantom_Hoover> elliott, fmap (A B : Set) (f : A -> B).
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
165 2010-12-11.txt:22:48:35: <Phantom_Hoover> fmap [elided or not actually there depending on what's set] id is a type error.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
166 2010-12-11.txt:22:49:03: <elliott> Phantom_Hoover: OK, please give me the full definition of fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
167 2010-12-11.txt:22:49:13: <elliott> Phantom_Hoover: OK, please give me the full definition of fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
168 2010-12-11.txt:22:49:36: <elliott> Phantom_Hoover: OK, please give me the full definition of fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
169 2010-12-11.txt:22:50:00: <Phantom_Hoover> Fixpoint fmap (A B : Set) (f : A -> B) (t : tree A) : tree B := [elided].
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
170 2010-12-11.txt:22:51:57: <Phantom_Hoover> Essentially, I'm told that fmap id is an error as id : ID rather than * -> *.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
171 2010-12-11.txt:22:52:26: <elliott> Phantom_Hoover: You might want to try using {A B : Set} in fmap.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
172 2010-12-11.txt:22:53:40: <elliott> Coq < Axiom fmap : forall (A B : Set) (f : A -> B) (t : tree A), tree B.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
173 2010-12-11.txt:22:53:40: <elliott> fmap is assumed
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
174 2010-12-11.txt:22:53:48: <elliott> fmap_id
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
175 2010-12-11.txt:22:55:33: <elliott> Coq < Definition fmap_id (A : Set) (t : tree A) : tree A := fmap A A (id (A:=A)) t.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
176 2010-12-11.txt:22:55:33: <elliott> fmap_id is defined
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
177 2010-12-11.txt:22:58:34: <elliott> Phantom_Hoover: When you say "fmap A A id t", it can't infer what the value of A is in id's type, (forall A, A -> A).
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
178 2010-12-16.txt:16:54:35: <Phantom_Hoover> ais523, erm... Functor and fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
179 2010-12-16.txt:16:55:02: <ais523> in fact, liftM and fmap are IIRC the same function
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
180 2010-12-18.txt:22:50:11: <Phantom_Hoover> Anything's a monad if you can get return, join and fmap working on it!
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
181 2010-12-18.txt:22:51:04: <elliott> fmap seems obvious.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
182 2010-12-18.txt:22:53:32: <Deewiant> Phantom_Hoover: join . fmap join = join . join
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
183 2010-12-18.txt:22:54:16: <Deewiant> = join . fmap return
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
184 2010-12-29.txt:19:43:14: <Phantom_Hoover_> Surely fmap f = (pure f <*>)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
185 2010-12-29.txt:19:53:50: <Phantom_Hoover_> Where fmap f = (pure f <*>)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
186 2011-01-09.txt:05:46:51: <oerjan> elliott: well it's fmap/liftM + <=< of course
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
187 2011-01-09.txt:05:48:00: <oerjan> :t (\f x -> fmap f . x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
188 2011-01-09.txt:05:49:20: <oerjan> lambdabot still defines (.) = fmap :D
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
189 2011-01-09.txt:05:49:47: <elliott> oerjan: but yes, of course it defines (.) = fmap, as specified by the Caleskell Report
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
190 2011-01-09.txt:05:50:26: <elliott> fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
191 2011-01-09.txt:05:51:43: <oerjan> indeed it _is_ fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
192 2011-01-09.txt:05:52:03: <elliott> fmap fmap fmap fmap fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
193 2011-01-09.txt:05:52:26: <oerjan> elliott: that reiterates after four fmaps
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
194 2011-01-14.txt:18:01:51: <lambdabot> ([(c1', s1), (c2', s2)] ++) `fmap` apply c xs
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
195 2011-01-14.txt:18:16:10: <oerjan> 19:04 lambdabot> ([(c1', s1), (c2', s2)] ++) `fmap` apply c xs
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
196 2011-01-22.txt:15:25:44: <oerjan> in which case, mdo iorefs <- (: iorefs) `fmap` newIORef whatever should work, i don't think you even need unsafeInterleaveIO for that
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
197 2011-01-23.txt:20:01:41: <lambdabot> NB: In lambdabot, (.) = fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
198 2011-01-23.txt:20:03:28: <elliott> olsner: imo map needs to become fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
199 2011-01-29.txt:03:37:37: <oerjan> :t \f x -> fmap ($ x) f
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
200 2011-01-29.txt:03:38:03: <elliott> @pl \f x -> fmap ($x) f
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
201 2011-01-29.txt:03:38:03: <lambdabot> flip (fmap . flip id)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
202 2011-01-29.txt:03:38:16: <elliott> let flip = flip (fmap . flip id)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
203 2011-01-29.txt:03:52:56: <oerjan> :t \f x -> fmap ($x) f
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
204 2011-01-29.txt:03:55:23: <oerjan> :t (\f x -> Data.Traversable.traverse f x) `asTypeOf` (\f x -> fmap ($x) f)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
205 2011-01-29.txt:03:58:11: <oerjan> :t (\f x -> Data.Traversable.sequenceA f x) `asTypeOf` (\f x -> fmap ($x) f)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
206 2011-01-31.txt:02:26:15: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
207 2011-01-31.txt:02:32:30: <elliott> fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
208 2011-01-31.txt:02:35:11: <oerjan> :t let map f (Left x) = fmap f x; map f (Right b) = Nothing in map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
209 2011-01-31.txt:02:35:51: <oerjan> :t let map f (Left x) = Just $ fmap f x; map f (Right b) = Nothing in map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
210 2011-01-31.txt:02:36:47: <oerjan> :t let map f (Left x) = Just $ fmap f x; map f (Right False) = Nothing; map f (Right True) = [] in map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
211 2011-01-31.txt:02:36:55: <oerjan> :t let map f (Left x) = Just $ fmap f x; map f (Right False) = Nothing; map f (Right True) = Just [] in map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
212 2011-02-03.txt:23:03:52: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
213 2011-02-03.txt:23:03:52: <lambdabot> Control.Monad fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
214 2011-02-03.txt:23:04:04: <elliott> @pl flip fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
215 2011-02-03.txt:23:04:04: <lambdabot> flip fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
216 2011-02-03.txt:23:09:18: <lambdabot> (`fmap` pUL) . (:<) =<< pSimpleUL
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
217 2011-02-07.txt:00:40:10: <Deewiant> Use fmap and ap and @unpl
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
218 2011-02-07.txt:01:16:26: <lambdabot> Data.Traversable fmapDefault :: Traversable t => (a -> b) -> t a -> t b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
219 2011-02-07.txt:01:16:26: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
220 2011-02-07.txt:12:20:21: <lambdabot> (popVec >>=) . (return .) =<< fmap (flip poke) pop
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
221 2011-02-08.txt:11:41:32: <oerjan> > let (<$) = fmap . const; infixl 1 <$ in do x <- y <$ Just z ; return x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
222 2011-02-08.txt:11:41:44: <oerjan> > let (<$) = fmap . const; infixl 1 <$ in do x < - y <$ Just z ; return x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
223 2011-02-08.txt:18:13:26: <copumpkin> elliott: I dunno, which do you typically want to fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
224 2011-02-09.txt:19:12:46: <elliott> :t fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
225 2011-02-17.txt:19:50:32: <elliott> oerjan: `fmap` instead of <$>? srsly?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
226 2011-02-17.txt:19:57:28: <oerjan> <elliott> oerjan: `fmap` instead of <$>? srsly? <-- if i start using <$>, i'll soon want Applicative notation, and HP's Parsec doesn't have an instance, and basically i don't even want to bother to try because it makes me annoyed
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
227 2011-03-11.txt:17:35:39: <oerjan> flip and fmap, are there any others like that...
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
228 2011-04-13.txt:22:57:26: <newsham> oerjan: you could use `fmap` and `ap` instead of <$> and <*> if you wanted to stay in monad
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
229 2011-04-13.txt:22:57:57: <oerjan> also you mean liftM not fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
230 2011-04-13.txt:22:58:16: <newsham> ?type (liftM, fmap)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
231 2011-05-12.txt:16:10:36: <ais523> I know I tend to define fmap for my own structures if it fits
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
232 2011-05-12.txt:16:14:24: <ais523> fmapM :: Monad m => (a -> m b) -> (t a) -> m (t b)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
233 2011-05-12.txt:16:14:35: <ais523> I think I needed to cross fmap and mapM
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
234 2011-05-14.txt:10:18:01: <oerjan> synonym for fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
235 2011-05-14.txt:10:18:03: <CakeProphet> fmap. applies a function to a Functor instance. All monads are functors.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
236 2011-05-14.txt:10:20:45: <oerjan> it's the monad equivalent of fmap, existing for stupid "missing subclassing" reasons
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
237 2011-06-06.txt:22:47:03: <CakeProphet> ah so <$ is fmap.const
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
238 2011-06-06.txt:22:47:20: <elliott> :t fmap.const
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
239 2011-06-06.txt:22:48:27: <elliott> because I think we could deduce that (fmap . const) and (<$) are the same by just the types
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
240 2011-06-06.txt:22:48:35: <lambdabot> fmap :: (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
241 2011-06-06.txt:22:49:00: <oerjan> and i think it applies to fmap.const = (<$)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
242 2011-06-06.txt:22:49:25: <elliott> \a b -> fmap _ b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
243 2011-06-06.txt:23:04:50: <elliott> > fmap (take 9) (some (Just 9))
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
244 2011-06-06.txt:23:21:33: <elliott> fmap f (ZipList xs) = ZipList (map f xs)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
245 2011-06-13.txt:00:52:51: <elliott_> oh its actually cofmap :: (a -> b) -> acc b -> acc a :P
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
246 2011-06-13.txt:00:54:19: <elliott_> > fmap succ (9,9)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
247 2011-06-13.txt:01:04:35: <elliott_> cofmap :: (a -> b) -> cof b -> cof a
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
248 2011-06-13.txt:01:04:39: <elliott_> cofmap f (Flip g) = Flip (g . f)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
249 2011-06-15.txt:00:59:32: <monqy> not fmap?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
250 2011-06-15.txt:00:59:52: <monqy> (I was expecting it to be a synonym of fmap)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
251 2011-06-15.txt:00:59:55: <oerjan> i _thought_ they'd also made map a synonym for fmap, but i must have misremembered
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
252 2011-06-15.txt:01:40:59: <oerjan> it's rather stupid to have map, fmap, <$>, liftM
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
253 2011-06-15.txt:01:41:43: <lambdabot> f <$> a = fmap f a
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
254 2011-06-15.txt:01:41:54: <Patashu> so it's just infix fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
255 2011-06-15.txt:01:41:58: <Patashu> why not just use `fmap` then
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
256 2011-06-15.txt:01:42:07: <oerjan> Patashu: it can work on functors too, in fact it did before Haskell 98 revision, when fmap = map
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
257 2011-06-15.txt:01:42:55: <oerjan> it separated map from fmap, making map work just for lists.
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
258 2011-06-15.txt:01:45:07: <monqy> just use fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
259 2011-06-15.txt:01:47:56: <monqy> e.g. for a Functor instance of a Monad, fmap f = (>>= return . f)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
260 2011-06-15.txt:01:48:27: <lambdabot> fmap :: (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
261 2011-06-15.txt:01:49:59: <Patashu> (+) <$> [1,2] <*> [10,20] becomes <*> ( fmap (+) [1,2] ) ( [10,20] )
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
262 2011-06-15.txt:01:50:54: <Patashu> > (<*>) ( fmap (+) [1,2] ) ( [10,20] )
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
263 2011-06-21.txt:11:45:59: <elliott> :t ?f.?g `fmap` x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
264 2011-06-21.txt:11:46:02: <elliott> :t ?f.?g `fmap` ?x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
265 2011-06-21.txt:11:46:04: <elliott> :t ?f . ?g `fmap` ?x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
266 2011-06-21.txt:11:46:05: <lambdabot> cannot mix `.' [infixr 9] and `fmap' [infixl 9] in the same infix expression
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
267 2011-06-21.txt:12:04:15: <elliott> <elliott> ?pl \f x -> join (fmap f x)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
268 2011-06-21.txt:18:53:39: <elliott_> ?pl (\(r,n) -> ifuckinghateyouass r) `fmap` I.zip it countWords
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
269 2011-06-21.txt:18:53:40: <lambdabot> (ifuckinghateyouass . fst) `fmap` I.zip it countWords
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
270 2011-06-21.txt:18:53:47: <elliott_> ?pl flip fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
271 2011-06-21.txt:18:53:47: <lambdabot> flip fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
272 2011-06-21.txt:18:54:33: <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
273 2011-06-21.txt:18:54:33: <lambdabot> Control.Monad fmap :: Functor f => (a -> b) -> f a -> f b
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
274 2011-06-21.txt:19:07:04: <elliott_> where opt field ctr = \it -> uncurry (setL field . Just) `fmap` I.zip it ctr
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
275 2011-06-21.txt:19:32:27: <elliott_> option field ctr = \it -> uncurry (setL field . Just) `fmap` I.zip ctr it
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
276 2011-06-21.txt:19:39:53: <oerjan> elliott_: perhaps that fmap is also building thunks of what to apply
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
277 2011-06-23.txt:19:22:47: <elliott_> > foldlM (\r x -> if even x then (9:) `fmap` r else Nothing) [] [0,0,9]
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
278 2011-06-25.txt:01:03:21: <monqy> :t fmap id
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
279 2011-07-01.txt:10:21:49: <Deewiant> ?src Either fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
280 2011-07-01.txt:10:21:49: <lambdabot> fmap _ (Left x) = Left x
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
281 2011-07-01.txt:10:21:50: <lambdabot> fmap f (Right y) = Right (f y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
282 2011-07-03.txt:02:53:37: <elliott> fmap = liftM
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
283 2011-07-03.txt:06:59:08: <elliott> fmap f (T ph pf pr) = T ( \ k -> ph ( k .f ))
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
284 2011-07-03.txt:07:22:14: <elliott> you can't do that fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
285 2011-07-03.txt:07:26:33: <elliott> so basically I have fmap... for lenses :)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
286 2011-07-03.txt:07:27:05: <elliott> yep, what I have is (.), aka generalised fmap :D
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
287 2011-07-03.txt:07:48:51: <elliott> fmap concat (sequence (concatMap (\(n,_,_) -> [ [d| foo = 9 |] ]) oks))
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
288 2011-07-03.txt:08:16:00: <elliott> mapM (\(n,_,_) -> funD (transform n) [clause [] (normalB ([|Data.Lens.Lens|] `appE` varE n `appE` lamE [varP _f, varP _x] (recUpdE (varE _x) [(\x->(n,x)) `fmap` [|$(varE _f) ($(varE n) $(varE _x))|]]))) []]) oks
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
289 2011-07-03.txt:08:35:31: <elliott> mapM (\(n,_,_) -> funD (transform n) [clause [] (normalB ([|Data.Lens.Lens|] `appE` varE n `appE` lamE [varP _f, (asP _x (recP nn [return (n,VarP _y)]))] (recUpdE (varE _x) [(\x->(n,x)) `fmap` [|$(varE _f) $(varE _y)|]]))) []]) oks
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
290 2011-07-03.txt:11:04:01: <olsner> CakeProphet: you can think of it as fmap (fmap (flip fmap fmap) fmap) fmap, if composition is confusing :)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
291 2011-07-03.txt:11:13:35: <olsner> also, (.).(.) = the boobies combinator = fmap fmap fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
292 2011-07-03.txt:11:16:18: <CakeProphet> but... fmap = (.) for functions right?
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
293 2011-07-03.txt:11:17:41: <olsner> yes, one functor instance has fmap = (.), and to make matters better lambdabot has (.) defined as fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
294 2011-07-03.txt:11:24:14: <Phantom_Hoover> <olsner> yes, one functor instance has fmap = (.), and to make matters better lambdabot has (.) defined as fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
295 2011-07-03.txt:11:33:41: <CakeProphet> :t fmap
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
296 2011-07-05.txt:00:39:22: <elliott> :t liftM2 (:) (return ?x) (return `fmap` copy ?y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
297 2011-07-05.txt:00:39:24: <elliott> :t liftM2 (:) (return ?x) (return `fmap` ?copy ?y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
298 2011-07-05.txt:00:39:32: <elliott> :t \x y -> liftM2 (:) (return x) (return `fmap` ?copy y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
299 2011-07-05.txt:00:39:43: <elliott> ?pl liftM2 (:) (return x) (return `fmap` ?copy y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
300 2011-07-05.txt:00:39:48: <elliott> ?pl \x y -> liftM2 (:) (return x) (return `fmap` copy y)
964d6cdb2609 <hagb4rd> pastelogs fmap
HackBot
parents:
diff changeset
301 [too many lines; stopping]