2009/8/18 Dusan Kolar :
> Dlists maybe good it all the app is written using them. Probably not good
> idea to switch to them in the middle of project...
I have a different criterion for DLists. I think they are best to use
in small scopes (I think the same of monads), as opposed to
interfacing be
On Tue, Aug 18, 2009 at 18:23, Bulat Ziganshin wrote:
> Hello Sean,
>
> Tuesday, August 18, 2009, 7:49:21 PM, you wrote:
>
> > writeFile "/dev/null" $ show $ [1 .. 10001000]
>
> it may be dominated by show+writeFile. i suggest you to compute, say,
> sum of all elements instead
>
Thank you, Bula
Hello Sean,
Tuesday, August 18, 2009, 7:49:21 PM, you wrote:
> writeFile "/dev/null" $ show $ [1 .. 10001000]
it may be dominated by show+writeFile. i suggest you to compute, say,
sum of all elements instead
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
> >>> During a small project I'm trying to develop a small application. It
> >>> becomes quite often that I need a function mapapp:
> >>>
> >>> mapapp _ [] ap = ap
> >>> mapapp f (a:as) ap = f a : map f as ap
>
> >> Of course,
> >>> (map f list) ++ append
> >>> would do the same as
> >>>
> >>>
module Main where
mymap f xs = m xs
where m [] = []
m (x:xs) = f x:m xs
mymapp1 f xs ys = m xs
where m [] = ys
m (x:xs) = f x:m xs
mymapp2 f [] ys = ys
mymapp2 f (x:xs) ys = f x:mymapp2 f xs ys
mapp1 f xs ys = (f`map`xs) ++ ys
mapp2 f xs ys = (f`mymap`xs)
Clemens Fruhwirth writes:
> 2009/8/18 Dusan Kolar :
>> Hello all,
>>
>> During a small project I'm trying to develop a small application. It
>> becomes quite often that I need a function mapapp:
>>
>> mapapp _ [] ap = ap
>> mapapp f (a:as) ap = f a : map f as ap
>>
>> I tried hoogle to find suc
Dusan Kolar writes:
> Dlists maybe good it all the app is written using them. Probably not good
> idea to switch to them
> in the middle of project...
>
> I know it is lazy, but I don't think it is able to eliminate operations, is
> it?
>
> At least intuitively, the map f list takes n*C ticks (
2009/8/18 Dusan Kolar :
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : map f as ap
>
> I tried hoogle to find such a function with no success. Is there
Dlists maybe good it all the app is written using them. Probably not
good idea to switch to them in the middle of project...
I know it is lazy, but I don't think it is able to eliminate operations,
is it?
At least intuitively, the map f list takes n*C ticks (C is for
application of f and lis
> > mapapp _ [] ap = ap
> > mapapp f (a:as) ap = f a : map f as ap
>
> What does mapapp do? What is its type?
Never mind, I've got it now.
Alistair
*
Confidentiality Note: The information contained in this message,
and any attachmen
Hello Dusan,
Tuesday, August 18, 2009, 2:50:38 PM, you wrote:
> but with less efficiency. Or am I wrong?
probably wrong. haskell is lazy language
also there is differential lists (dlist) implementation on hackage
--
Best regards,
Bulatmailto:bulat.zigans...@gma
Dusan Kolar wrote:
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : map f as ap
>
> I tried hoogle to find such a function with no success. Is there any
>
> From: haskell-cafe-boun...@haskell.org
> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Dusan Kolar
>
> During a small project I'm trying to develop a small
> application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap = ap
> mapapp f (a:as) ap = f a : m
Hi.
Have you done any measurements that prove that such a function would
indeed increase performance noticeably?
2009/8/18 Dusan Kolar :
> Hello all,
>
> During a small project I'm trying to develop a small application. It
> becomes quite often that I need a function mapapp:
>
> mapapp _ [] ap =
Hello all,
During a small project I'm trying to develop a small application. It
becomes quite often that I need a function mapapp:
mapapp _ [] ap = ap
mapapp f (a:as) ap = f a : map f as ap
I tried hoogle to find such a function with no success. Is there any
function/functions built-in "st
15 matches
Mail list logo