#haskell - Sat 21 Apr 2007 between 01:51 and 01:58

NY Lost Funds



sorearsure!
:t (foldr (+) 0 .) . zipWith (+)
lambdabotforall a. (Num a) => [a] -> [a] -> a
monochromI haven't read these, but http://www.cs.iastate.edu/~leavens/FOAL/papers-2007/Hofer-Ostermann.pdf and http://www.cs.iastate.edu/~leavens/FOAL/papers-2007/Sulzmann-Wang.pdf sound promising on AOP in Haskell.
lambdabothttp://tinyurl.com/2he73y
rubyruysorear: Say you're writing (in a non-fp language) a banking app of sorts and you're working on a method that transfers money from one account to another, like transfer(from, to, amount). At the core the function should simply deduct money from the 'from' account and add the same mount to the 'to' account. However, IRL such a function would annoyingly good
err s/good/huge
because you first have to add stuff like, permissions checking
and also checks for things like, don't overdraw the account
tuxplorersorear: Thanks...
Saizanrubyruy: IRC mangled your first message
rubyruyand whatever mechanism you use to ensure operations stay atomic
SamB_XP_rubyruy: mwahaha, if only!
Saizanrubyruy: too long
rubyruy[1] Say you're writing (in a non-fp language) a banking app of sorts and you're working on a method that transfers money from one account to another, like transfer(from, to, amount).
[2] At the core the function should simply deduct money from the 'from' account and add the same mount to the 'to' account. However, IRL such a function would annoyingly good
that go through?
Saizanoh
it just ended :)
sorry
maukeit would good.
rubyruyi meant huge
:p
mauke"it would huge"?
sorearI'd just use STM :)
at_sorear: is it possible to define a function without arguments then? what's the difference between the very function and its value what it is called? how can I tell the difference whether the function, uhm, is being "abstracted" or beta-reduced?
SamB_XP_I think he meant "it would sleep"
monochrom"annoyingly good" is good? is annoying?
rubyruyso AOP basically says let's split that extra stuff in different modules and have agreed-upon "join points" where they can hook into
monochromHaskell is annoyingly good! :)
rubyruyit all seems like a good idea but when you actually see it used it ends up pretty ugly
maukeat_: a function without arguments is just a value
sorearat_: the point is a function with no arguments IS a value. 'x = 2' defines a function without arguments.
rubyruyhence me wondering if haskell can do it differently
sorearat_: it is called when you use the value, and no sooner
at_sorear: how do you implement random() function (without arguments) in haskell?
sorearat_: you don't
kpreid@type random
rubyruywait i know this - you cant have a random() function!
lambdabotforall g a. (Random a, RandomGen g) => g -> (a, g)

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 

IrcArchive

NY Lost Funds