(defn avg [xs] (double (/ (reduce + xs) (count xs)))) (def *samp 17 hours ago ... (defn avg [xs] (double (/ (reduce + xs) (count xs)))) (def *sample-size* 10000) ( defn sample-mean [coin] (avg (take *sample-size* coin))) ... http://pastebin.com/CgDqbVBA - 17 uur geleden -
Gelijkwaardige pagina's
|
def has_n_consecutive_numbers(n, xs): count = 0 last = 0 for x in ... 4 days ago ... def has_n_consecutive_numbers(n, xs): count = 0 last = 0 for x in sorted(xs)[:n]: if last: if x == last + 1: count += 1 if count >= n: return True else: ... http://pastebin.com/nCS6J8FC - 14k -
In cache
-
Gelijkwaardige pagina's
|
EViews.com • View topic - An introduction to EViews programming. for !i=1 to xs.@count-1 %iname = xs.@seriesname(!i) for !j=!i+1 to xs.@count % jname = xs.@seriesname(!j) eq.ls {%iname} c {%jname} ... http://forums.eviews.com/viewtopic.php?f=5&t=1638&start=15 - 35k -
In cache
-
Gelijkwaardige pagina's
|
99 questions/Solutions/16 - HaskellWiki 24 Dec 2011 ... dropEvery :: [a] -> Int -> [a] dropEvery list count = helper list count count where helper [] _ _ = [] helper (x:xs) count 1 = helper xs count count ... http://www.haskell.org/haskellwiki/99_questions/Solutions/16 - 27k -
In cache
-
Gelijkwaardige pagina's
|
Wc - HaskellWiki 30 Aug 2009 ... main :: IO () main = interact (count 0) where count i [] = show i count i ('n':xs) = count (i+1) xs count i (_:xs) = count i xs. $ ghc -O wc.hs $ time . http://www.haskell.org/haskellwiki/Wc - 36k -
In cache
-
Gelijkwaardige pagina's
|
VB Helper: HowTo: Find solutions to the equilateral triangle puzzle ... ... Double Dim dx_ki As Double Dim dy_ki As Double Dim dist_ki As Double Set Solutions = New Collection For i = 1 To Xs.Count For j = i + 1 To Xs.Count dx_ij ... http://www.vb-helper.com/howto_find_equilateral_triangles.html - 15k -
In cache
-
Gelijkwaardige pagina's
|
Coffee Driven Development: From for loop to anamorphism 25 Apr 2009 ... AreEqual(10, xs.Count()); }. In this post, I will show you how this code can be made more general, ultimately turning it into an anamorphism over ... http://coffeedrivendevelopment.blogspot.com/2009/04/from-for-loop-to-anamorphism.html - 53k -
In cache
-
Gelijkwaardige pagina's
|
c# - Chart of IEnumerable LINQ equivalents in Scala? - Stack Overflow Contains(x, eq) -> xs.exists(eq(x, _)) xs.Count() -> xs.size xs.Count(pred) -> xs. count(pred) xs.DefaultIfEmpty() -> if(xs.isEmpty) List(0) else xs ... http://stackoverflow.com/questions/8104846/chart-of-ienumerable-linq-equivalents-in-scala - 47k -
In cache
-
Gelijkwaardige pagina's
|
nからn2までの素数だけを出力 — Gist 5 Jan 2012 ... prime (x:xs) count= do. if x >=2. then do. if x /= count. then do. if x`mod`count == 0. then do. prime xs (count+1). else do. prime (x:xs) (count+1) ... https://gist.github.com/1566685 - 15k -
In cache
-
Gelijkwaardige pagina's
|
What's New? - Universiteit Utrecht 8 nov 2011 ... February 24, 1999 Removed the icon and link to the XSCount statistics from our Main Menu, because XSCount stopped their services. http://www.projects.science.uu.nl/igg/whatsnew.html - 15k -
In cache
-
Gelijkwaardige pagina's
|
|