[Note, total newbie to mailing lists in general, and beginner in haskell as one might have surmised ^^ hopefully I'm doing the right thing here with this mail...]
All, or virtually all in the title, but I'll develop. I wrote some useful function (which i rather awkwardly called "point2", for "(.) operator applied at the level of the second argument of the first function"). Here is its def:
anyways, it's pretty useful if you wanna combine f and g but g is meant to output the *second* argument of f, not the first, that is:
If you got all I said above, my question is then to know if this point2 function already exists officially, coz I don't really wanna reinvent the wheel, plus I wonder how they called it ^^ I'm not really satisfied of "point2" as variable name. I'd love (.2) but it's not compatible with Haskell. ^^ Also, same question for the following function (does it already exists?), again a sibling of (.), here, the purpose being to write h(a, b) = f (g(a, b)) in point-free style:
I'm not entirely sure, but I think we could write:
un/curry functions' defs, if needed:
_______________________________________________ Beginners mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners |
Hi, you might wanna take a look at Hoogle and Hayoo. They allow you to search for functions using names or type signatures. Hope this helps. _______________________________________________ Beginners mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners |
Hoogle was my first stop, didn't find anything, but Hayoo is much more complete, found all of it!
"My" after2 has no less than 4 different synonymous: (oo), (.:), (comp2), (dot). and i checked my curry theory as correct. I found "point2" too right beside (.:), dubbed (.^). Those two inside a "pointlessfun" package (?) ^^ Hence, thanks, I found what I needed. :) Do I need to close or mark the discussion as "solved" or something, somehow? Le vendredi 8 avril 2016, Sumit Sahrawat, Maths & Computing, IIT (BHU) <[hidden email]> a écrit : > Hi, you might wanna take a look at Hoogle and Hayoo. They allow you to search for functions using names or type signatures. > > Hope this helps. _______________________________________________ Beginners mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners |
Ok
thanks! By the way, I didn't know the formatting (especially, code/noncode distinction) was erased in the process of archiving my mail, sorry
for the unfortunate, probable, unreadability of my first message. Actually,
I have another question that somewhat is in continuity, as regards one
definition I found for after2 (with another name of course, though here it's
irrelevant):> after2 :: (c -> d) -> (a -> b -> c) -> a -> b -> d Or seen from another angle: > f (g a b) :: d > (f .) (g a) :: b -> d > ((f .) .) g :: (a -> b -> d) From there, I had the idea and desire to check if we could build a generalization of this operation, in this fashion:2016-04-09 0:09 GMT+02:00 Sumit Sahrawat, Maths & Computing, IIT (BHU) <[hidden email]>:
2016-04-09 0:04 GMT+02:00 Silent Leaf <[hidden email]>: Hoogle was my first stop, didn't find anything, but Hayoo is much more complete, found all of it! _______________________________________________ Beginners mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners |
Thanks! I'll definitely look into it. :)
_______________________________________________ Beginners mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |