2,540 reputation
1028
bio website petr.pudlak.name
location Czech Republic
age
visits member for 2 years, 3 months
seen Nov 16 at 9:55

21h
awarded  Notable Question
Nov
21
awarded  Popular Question
Nov
7
comment I'm being warned that the Monoid I'm creating is an Orphan Instance. Is there a better way to write this functionality in?
@Josiah Exactly, that'd be my suggestion. Add other instances as needed, like Monad, Applicative etc. Extension GeneralizedNewtypeDeriving can save you a lot of work.
Nov
7
answered I'm being warned that the Monoid I'm creating is an Orphan Instance. Is there a better way to write this functionality in?
Oct
11
comment Is it possible to have Ad-Hoc polymorphism with runtime dispatch?
@SargeBorsch What if you have something like print one?
Oct
10
answered Is it possible to have Ad-Hoc polymorphism with runtime dispatch?
Oct
3
comment Alternative to language purity
You might be also interested in unique types, which is an alternative way for dealing with side affects to the IO monad. They're used in languages Clean and Mercury.
Sep
26
awarded  Notable Question
Sep
9
awarded  Good Answer
Aug
7
awarded  Yearling
Jul
24
answered Is immutability very worthwhile when there is no concurrency?
Jul
15
comment In what programming language did “let” first appear?
@JohanKarlsson I'm not claiming it is a direct answer, but I think this is also relevant to the topic. In particular why was let introduced, as the question starts with I was wondering about the origins of the "let" ...
Jul
6
asked Who invented Haskell's type classes?
Jul
3
awarded  Good Question
Jul
2
awarded  Curious
May
5
comment Guidelines for returning collections from public functions
@TobiasBrandt I updated the example showing the changes when replacing Set with HashSet.
May
5
revised Guidelines for returning collections from public functions
added 1363 characters in body
May
4
comment Guidelines for returning collections from public functions
@TobiasBrandt No, I'm not aware of any packages that follow the second approach. I agree, it's similar to C, with the small difference that by supplying the singleton function explicitly, we can avoid ambiguous types (at the cost of client having to supply it every time and perhaps also RankNTypes).
May
4
comment Guidelines for returning collections from public functions
@TobiasBrandt Yes, you need to decide it, but you're not bound by the implementation. If you later decide to change the internal representation from Set to HashSet, you can just replace resultToSet by a more sophisticated conversion. So clients won't be dependent on the internal representation.
May
3
answered Guidelines for returning collections from public functions