User talk:Hout: Difference between revisions
Content added Content deleted
mNo edit summary |
(→Functional Python and pythonic Python: def is too sweet) |
||
Line 270: | Line 270: | ||
:::: P.S. I genuinely wish Perl-6 good luck (again). If its new ideas gain traction who knows, Python might add a library... :-)<br> |
:::: P.S. I genuinely wish Perl-6 good luck (again). If its new ideas gain traction who knows, Python might add a library... :-)<br> |
||
[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 16:12, 28 October 2018 (UTC) |
[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 16:12, 28 October 2018 (UTC) |
||
===def is too sweet=== |
|||
An important functional axiom is that functions can be assigned to names. In python def n(g) is sugar for n=lambda g:.... |
|||
So writing def n(g)=return lambda g:.... is a bit silly. I've changed # enumFromTo :: Int -> Int -> [Int] |
|||
to 'enumFromTo=lambda m: lambda n: list(range(m,1+n))' in McNuggets to see if you agree--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:55, 2 February 2019 (UTC) |