Comments for Mathematics and Computation
http://math.andrej.com
Mathematics for computersMon, 24 Nov 2014 02:28:10 +0000hourly1http://wordpress.org/?v=3.6-beta3-24485Comment on Python’s lambda is broken! by In languages which create a new scope each time in a loop block, a new local copy of the local loop variable is created each time in that new scope? | Ngoding
http://math.andrej.com/2009/04/09/pythons-lambda-is-broken/comment-page-2/#comment-48783
In languages which create a new scope each time in a loop block, a new local copy of the local loop variable is created each time in that new scope? | NgodingMon, 24 Nov 2014 02:28:10 +0000http://math.andrej.com/?p=184#comment-48783[…] is similar to the topic discussed here: http://math.andrej.com/2009/04/09/pythons-lambda-is-broken/ . In some programming languages, when you loop over a variable, the body of the loop construct is […]
]]>Comment on Am I a constructive mathematician? by Two kinds of mathematics | The Lab Lunch
http://math.andrej.com/2012/10/03/am-i-a-constructive-mathematician/comment-page-1/#comment-48778
Two kinds of mathematics | The Lab LunchFri, 21 Nov 2014 08:39:02 +0000http://math.andrej.com/?p=1247#comment-48778[…] “classical” mathematics: they simply are two different worlds, as explained very nicely by Andrej Bauer. The universe of mathematics would be poorer without any of them. Similarly, the universe of […]
]]>Comment on Programming with Algebraic Effects and Handlers by Two views of programming language design | The Lab Lunch
http://math.andrej.com/2012/03/08/programming-with-algebraic-effects-and-handlers/comment-page-1/#comment-48678
Two views of programming language design | The Lab LunchFri, 15 Aug 2014 16:23:00 +0000http://math.andrej.com/?p=1144#comment-48678[…] possible, using the rather well known monads or the funkier lenses or the more sophisticated algebraic effects. However, it is very difficult in general to make types match whatever arbitrary interface your […]
]]>Comment on How to implement dependent type theory I by Andrej Bauer
http://math.andrej.com/2012/11/08/how-to-implement-dependent-type-theory-i/comment-page-1/#comment-48625
Andrej BauerSat, 19 Jul 2014 12:44:43 +0000http://math.andrej.com/?p=1284#comment-48625Yes, that’s correct. Thanks!
]]>Comment on How to implement dependent type theory I by MHD
http://math.andrej.com/2012/11/08/how-to-implement-dependent-type-theory-i/comment-page-1/#comment-48624
MHDThu, 17 Jul 2014 23:17:33 +0000http://math.andrej.com/?p=1284#comment-48624You have a mistake in your first “wrong” definition of infer universe:
(** Why is this infer_universe wrong? *)
and bad_infer_universe ctx t =
match infer_type ctx t with
| Universe k -> u
| App _ | Var _ | Pi _ | Lambda _ -> Error.typing "type expected"

It should have a little let-statement a la
(** Why is this infer_universe wrong? *)
and bad_infer_universe ctx t =
let u = infer_type ctx t in
match u with
| Universe k -> u
| App _ | Var _ | Pi _ | Lambda _ -> Error.typing "type expected"
]]>