Yitz writes (in the Haskell Cafe):
This gives O(log k * (n + k)) execution in constant memory.
I guess that should be O(k) memory.
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
handle nested-
guards with
fall-throughs just fine.
There have been proposals to use the offside rule to resolve the
ambiguity, but
I can't recall if this was implemented.
See http://mailman.science.ru.nl/pipermail/clean-list/
1997/000175.html for
some examples.
Cheers,
Ronny Wichers
Spencer Janssen writes (in the Haskell Cafe):
Here's some code I wrote a while back for computing the nth Fibonacci
number. It has O(log n) time complexity [..]
The nth Fibonacci number has O(n) digits.
Cheers,
Ronny Wichers Schreur
___
Haskell
(though I'm not entirely sure) that these distinctions
are generalized for
other data types by talking about element strictness and spine
strictness.
No, there's no such generalisation.
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
Haskell
. However, it is too brief
for me to grasp. Does anybody have any suggestion on where to look?
See Mark Jones's Typing Haskell in Haskell
http://www.cse.ogi.edu/~mpj/thih/.
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
Haskell-Cafe
,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
) where Clean's strictness analysis falls short.
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
is strict in more arguments in the
recursion.
[In Clean] you can, for example, make an unboxed, strict array
just by writing [# 1, 2, 3 !] rather than [1, 2, 3]
I call [# 1, 2, 3 !] a tail-strict list with unboxed elements
(it doesn't have constant time access).
Cheers,
Ronny Wichers Schreur
/License_Conditions/license_conditions.html.
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
this. Will you also have solved
the granularity problem in these two to three years?
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
/Data.Bits.html
This library will let you use a shift instead of a division,
but won't give you a constant time size function for Integers.
Cheers,
Ronny Wichers Schreur
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
,
Ronny Wichers Schreur
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Duncan Coutts writes (to the Haskell Mailing list):
I'm trying to write a generic curry ( uncurry) function that works for
functions of any arity.
See http://www.haskell.org/pipermail/haskell/2003-April/011720.html
where oleg presents a (ghc-specific) solution.
Cheers,
Ronny Wichers Schreur
], [17], [8,9], [], [], [] ..]
Cheers,
Ronny Wichers Schreur
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
the (visual) interpretation depends on the font
you use (fixed width vs. proportional).
Cheers,
Ronny Wichers Schreur
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
- countAll' cs 1 (Counts (nl+1) nw (nc+1))
The function countAll' is now strict in its counts argument. Because of the strictness
flags in Counts, each count is evaluated.
I think this looks nicer than using local calls to `seq`.
Cheers,
Ronny Wichers Schreur
analyzer
again for these functions.
Cheers,
Ronny Wichers Schreur
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
matt hellige writes (to the haskell mailing list):
[..] consider:
sum 0 x = x
sum x y = x + y
if the first argument is 0, we don't need to inspect the second
argument at all.
But sum returns its second argument, so it's still strict in that
argument.
Cheers,
Ronny Wichers Schreur
,
St. Petersburg, Florida, January 1996.
Available from http://lampwww.epfl.ch/~odersky/papers/.
Cheers,
Ronny Wichers Schreur
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
])]
which is equivalent to your o_array function with the modified triangleArea
(I think).
Cheers,
Ronny Wichers Schreur
x for function
types:
intlist_to_integer
:: [Int] - Integer
Or look at o's and flippo's types:
(.) :: ((a - b) - (c - a)) - (c - b)
flip (.) :: ((a - b) - (b - c)) - (a - c)
Surely the second one is much cooler!
Cheers,
Ronny Wichers Schreur
I wrote:
(.) :: ((a - b) - (c - a)) - (c - b)
flip (.) :: ((a - b) - (b - c)) - (a - c)
Hm, let me try that again:
(.) :: (a - b) - (c - a) - (c - b)
flip (.) :: (a - b) - (b - c) - (a - c)
Cheers,
Ronny Wichers Schreur
| string _to_int_list|.|| int_list_to_integer |
| | | | | |
.-. .-.
Cheers,
Ronny Wichers Schreur
float). In the
second program the identity (with type a - a) will get its
argument from the heap (extended float).
There's a trade-off here between precision, efficiency and
referential transparency.
Cheers,
Ronny Wichers Schreur
24 matches
Mail list logo