On Wed, 8 Aug 2001, Wolfgang Jeltsch wrote:
> I totally agree with Gary. In my opinion the unary minus is a anomaly in
> Haskell which causes a lot of problems while beeing not that useful. For me
> it is totally okay to use negate x instead of -x.
>
> Gary wrote:
> >
> > As long as were tryi
Hannah Schroeter wrote:
| * thread a random generator through randomPick, giving it the
| type signature:
| randomPick :: (RandomGen g) => g -> Int -> [a] -> ([a], g)
It is not necessary to thread the random generator through.
This is the reason why the "split" function exists in the
Rand
Hello!
On Thu, Aug 09, 2001 at 12:10:12AM +1000, Vincent Tseng wrote:
> hi
> does anyone know how to do this ?
> a function that will "randomly" takes elements from a list
> eg randomPick 3 ['a','b','c','d','e'] = ['d','a','a']
Your example suggests a type signature like:
randomPick :: Int -
hi
does anyone know how to do this ?
a function that will "randomly" takes elements from a
list
eg randomPick 3 ['a','b','c','d','e'] =
['d','a','a']
thanks
Hello,
I totally agree with Gary. In my opinion the unary minus is a anomaly in
Haskell which causes a lot of problems while beeing not that useful. For me
it is totally okay to use negate x instead of -x.
Wolfgang
Gary wrote:
> Hello people,
> I've been studying the Haskell 98 report as part
Thanks to all who
responded.
"Cagdas Ozgenc" <[EMAIL PROTECTED]> writes:
> The following function generates a type error.
>
> headColumnwise :: [a] -> a
> headColumnwise line = [ head line | line <- p ]
Surely, the parameter should be "p"?
> ERROR ch6ex1.hs:14 - Inferred type is not general enough
> *** Expression: he
Hi,
The following function generates a type error.
headColumnwise :: [a] -> a
headColumnwise line = [ head line | line <- p ]
ERROR ch6ex1.hs:14 - Inferred type is not general enough
*** Expression: headColumnwise
*** Expected type : [a] -> a
*** Inferred type : [[a]] -> [a]
If I change th
Simon Peyton-Jones wrote
> | 2) The semantics of "module M" style entries in export lists seems to
> |Program 2: module A(module B, ...) where
> |~~ import qualified B
> | ... code that doesn't import B ...
> |
> |A similar example: now B appears as an impo