#haskell - Wed 25 Apr 2007 between 03:42 and 03:54



boseven broken stuff like X11-extras and Crypto :-)
donsX11-extras is broken?
got today's release? maybe its unborked
bosit has a few little packaging problems, such as no configure script in the tarball.
donsyeah, that's fixed now.
naraingregor: scanl transforms a list into a new list threading a value through it, such as my runningsum above
donsgrab X11-extras-0.1 from hackage
bosok, i grabbed it earlier today, but that was in the stale ancient age of 0.0 :-)
donsyeah :-) we move fast in open source haskell land
sjanssenbos: get with the times
0.0 is our allotted "oops" release
bosi'll have to whack cabal-install a bit so i can use it as a library inside cabal-rpm, downloading automatically for me
dolio> let dropAt n l = let (h, e:t) = splitAt (n - 1) l in h ++ dropAt n t; nth 1 = id; nth n = nth (n - 1) . scanl1 (+) . dropAt n in nth 3 [1..]
lambdabot[1,8,27,64,125,216,343,512,729,1000,1331,1728,2197,2744,3375,4096,4913,5832,...
merus> let del xs = zipWith (-) (tail xs) xs; cube = map (^3) [1..] in take 20 $ del $ del $ del cube
lambdabot[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
AStormBTW, does wxHaskell work now with ghc 6.6 and newest wxWidgets? (like 2.6.3.3)
gregor> let runningsum a [] = [a]; runningsum a (x:xs) = a + x : runningsum (a + x) xs in runningsum 0 [1, 3, 5, 7, 9]
lambdabot[1,4,9,16,25,25]
gregor> scanl (+) 0 [1, 3, 5, 7, 9]
lambdabot[0,1,4,9,16,25]
AStormso start from 1
gregorI tried doing a drop 1 on that scanl but still didn't get it right
dmwit> scanl1 (+) [1,3,5,7,9]
lambdabot[1,4,9,16,25]
AStorm?where scanl1
lambdabotI know nothing about scanl1.
naraingregor: scanl1 is probably a better choice, also drop 1 == tail
?src drop
lambdabotdrop n xs | n <= 0 = xs
drop _ [] = []
drop n (_:xs) = drop (n-1) xs
dmwit> drop 1 []
lambdabot[]
AStorm?src scanl1
lambdabotscanl1 f (x:xs) = scanl f x xs
scanl1 _ [] = []
narainwell, almost ==.
AStorm?src scanl
lambdabotscanl f q ls = q : case ls of

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

IrcArchive