[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.8097209 [View]
File: 23 KB, 500x119, 5815_89f1_500.png [View same] [iqdb] [saucenao] [google]
8097209

>>8097184
Yeah, it's a funny book. I think I like it, but I didn't read far for it being so slow.

I just want to add that it all depends on your goals. Most Haskell programmers also don't know much category theory. You'd learn it because you find it pretty.

funfact: pic related is executable Haskell code (if your editor accepts those letters) defining the List functor

e.g. for Int and String, you'd get
fmap : (Int -> String) -> (ListOf Int -> ListOf String)
fmap(f)(aList) := f(first_entry(aList)) append fmap(f)(rest_of(aList))
else
fmap(anyfunction)(anylist) := emptylist

but of course, you define the functor independent of the particular types, it works for all types in your system.

Navigation
View posts[+24][+48][+96]