DEV Community


Discussion on: Functional Programming (Light) #1

sizvix profile image

:-/ ...
You made a test with client.hasDevice && and the variable is elderlyWithoutDevice
And the FP version don't test client.hasDevice , so we can't make a comparaison ... :-/

sebring profile image
J. G. Sebring Author

Oh, it's actually a mess, yes you are right, can't believe this slipped in. I had a real life version containing much more logic and company specific bits I refactored out for the example. I'll update, my bad.

Forem Open with the Forem app