Skip to main content
4 events
when toggle format what by license comment
Jan 10, 2022 at 20:12 history edited Engineer Toast CC BY-SA 4.0
Headline formatting
Jul 17, 2015 at 13:34 comment added nimi ... ? can be defined shorter with a list comprehension: c?t=sum[1|x<-c,x==t]. Again, you're using ? only once, so use the body directly: ...show(sum[1|x<-l#[],x==t]).
Jul 17, 2015 at 13:34 comment added nimi Some suggestions: You're using p and s only once, so there's no need to give it a name (-> a#[]=[]:a#"NBM", same for p). BTW: words"N B M NB BM NBM" instead of the list of strings saves additional bytes. The import is only for intercalate, it's shorter te re-implement it: ...putStrLn.tail.((' ':)=<<)$map... and get rid of the import. Put the all the guards | in the definition of # in a single line and use 1<2 instead of True: ...#(b:m)|a==b=...l#m|1<2=[]... ...
Jul 17, 2015 at 9:32 history answered Jeremy List CC BY-SA 3.0