Dan: Sorry, I forgot to Reply to All.
On 12/10/2007, Dan Weston [EMAIL PROTECTED] wrote:
...
We don't want to make an intermediate list of zeroes and append, since
that could be wasteful. Just keep adding a zero to the head of our list
until it gets big enough. Our list is not copied (i.e. it
On Fri, 2007-10-12 at 16:20 -0700, Dan Weston wrote:
I like that name, and will henceforth use it myself until someone sees
fit to add it to the Prelude!
Maxime Henrion wrote:
Isaac Dupree wrote:
Dan Weston wrote:
applyNtimes :: (a - a) - Int - a - a
This sounds like it should be
Hi folks
Any comments and/or criticisms no matter how trivial on the following please:
wordSize :: [Int] - Int
wordSize xs = head (dropWhile ((length xs)) $ iterate (*2) 8)
intToBinWord :: Int - [Int]
intToBinWord n = reverse (take elements (xs ++ repeat 0))
@haskell.org
cc
Subject
[Haskell-cafe] more functions to evaluate
Hi folks
Any comments and/or criticisms no matter how trivial on the following
please:
wordSize :: [Int] - Int
wordSize xs = head (dropWhile ((length xs)) $ iterate
(*2) 8
Here is my suggestion: separation of concerns.
Your functions are doing multiple things at once (and there are
inefficiencies in your code that are not easy to see because it does do
several things at once).
You want the smallest word that an int will fit in. Sounds like you'll
need a
Dan Weston wrote:
applyNtimes :: (a - a) - Int - a - a
This sounds like it should be in the library somewhere
agree, I've used it a few times (mostly for testing things) - modulo
argument order and Int vs. Integer vs. (Num a = a)
Isaac
___
Isaac Dupree wrote:
Dan Weston wrote:
applyNtimes :: (a - a) - Int - a - a
This sounds like it should be in the library somewhere
agree, I've used it a few times (mostly for testing things) - modulo
argument order and Int vs. Integer vs. (Num a = a)
What do you think about calling it
I like that name, and will henceforth use it myself until someone sees
fit to add it to the Prelude!
Maxime Henrion wrote:
Isaac Dupree wrote:
Dan Weston wrote:
applyNtimes :: (a - a) - Int - a - a
This sounds like it should be in the library somewhere
agree, I've used it a few times
Dan Weston wrote:
I like that name, and will henceforth use it myself until someone sees
fit to add it to the Prelude!
Oh, and I guess we'd also need:
genericIterateN :: (a - a) - Integer - a - a
Which also got me thinking, wouldn't it make more sense to have the
count as the first
Maxime Henrion wrote:
Dan Weston wrote:
I like that name, and will henceforth use it myself until someone sees
fit to add it to the Prelude!
Oh, and I guess we'd also need:
genericIterateN :: (a - a) - Integer - a - a
Which also got me thinking, wouldn't it make more sense to have
10 matches
Mail list logo