|
Poking around Haskell and Functional programming by reading the "Learn You A Haskell" book. In one of the earlier sections, its talking about syntax in functions. It has this example:code:
|
# ¿ Mar 21, 2016 02:31 |
|
|
# ¿ May 14, 2024 12:56 |
|
dirby posted:informally: "lucky is a function from Integral things to Strings." Arcsech posted:I would say that as something like "From any Integral type to String." The first part in parentheses indicates that a must implement the type class Integral, then the rest reads like a normal type signature, with that restriction. KaneTW posted:"lucky is a function from any Integral type to String" sounds good to me. Maybe "from any type that's an instance of Integral to String" but while a bit more accurate it's also a mouthful Got it, thanks.
|
# ¿ Mar 21, 2016 03:17 |
|
I dabble with programming as a hobby, mainly in Perl and Python. Trying my hand at functional programming with Haskell. I've read in multiple places that functional programming makes concurrency/parallel programming much easier, and that functional programming scales really well. Could someone explain at a simpleton level why these things are easier with functional programming compared to OO/imperative languages?
|
# ¿ Mar 24, 2016 23:37 |
|
Thanks for the explanations/thoughts on functional programming and parallelism/concurrency. Still working my way through beginner tutorials in Haskell, think I'm going to drop the $60 on the Haskell Programming From First Principles book.
Hughmoris fucked around with this message at 00:09 on Apr 2, 2016 |
# ¿ Apr 2, 2016 00:06 |
|
Still working my way through the the haskell book and am having a hard time understanding this example. Its an if/else example function:code:
*I tried to include the full code snipped but SA is flagging me with a cloudflare error... It doesn't like something in the code sample. Hughmoris fucked around with this message at 02:09 on Apr 11, 2016 |
# ¿ Apr 11, 2016 02:05 |
|
Asymmetrikon posted:"Where" means that they're defining a term used in the definition of the function. It may be a little easier to understand with 'let' syntax and some parens: That makes sense, thanks.
|
# ¿ Apr 11, 2016 02:22 |
|
I realize this is pretty vague but for those who use Haskell, what type of projects have you used it for? I'm making another try at wrapping my head around functional programming with Haskell and looking for inspiration on some projects that people have use the language for. Outside of large, enterprise-size applications.
|
# ¿ Feb 2, 2017 01:22 |
|
|
# ¿ May 14, 2024 12:56 |
|
Any recommended F# blogs and tutorial videos? I tried to wrap my head around FP using Haskell and it just wasn't taking, so I figure I'll give F# a whirl.
|
# ¿ Jul 15, 2017 20:22 |