Better HN
topnewbestaskshowjobs
Log inSign up

mikemcgowan

11 karma · joined Oct 30, 2012 (14y ago) · 4 submissions

Submissions

comment 10y ago · link · parent

distance :: { x :: Number, y :: Number } -> Number

distance point = sqrt(point.x^2 + point.y^2)

The function application of sqrt shouldn't have parens.

And the type of distance should be

distance :: forall r. { x :: Number, y :: Number | r} -> Number

Otherwise, it's not row-polymorphic and you wouldn't be able to apply distance to a record of type Point3D.

comment 10y ago · link · parent

PureScript is mentioned on one of his slides.

comment 11y ago · link · parent

It's 9:30pm CET.

The sun set a while ago ...

comment 12y ago · link · parent

I use the vim plugin ("IdeaVim") in JetBrains PHPStorm & PyCharm.