Discussion on: Daily Challenge #82 - English Beggars

aminnairi profile image

Could you remind me what is the concept of point free style? I know I heard it somewhere when playing with Haskell but I can't remember haha!

citizen428 profile image
Michael Kohl

Making new functions by composing others without mentioning the actual arguments. In this specific case I did it for the higher-order ones in the pipeline:

(fun (i, _) -> i % count) -> (fst >> (flip (%) count))


(fun (_, l) -> List.sumBy (snd) l) -> (snd >> List.sumBy (snd))

One could maybe justify the second one (though it's probably still harder to read than the corresponding lambda for most people), but the first one isn't even shorter than the lambda and I had to implement flip myself since it's not part of F#'s standard library.