fold_left is now fold; fold_right is now foldBack

See

[link:blogs.msdn.com]

which discusses some of these naming changes (they are not recent - almost a year now!)

By on 4/6/2010 10:02 PM ()

Thanks for answers!

I'm aware of some of these changes but I'm looking for F# List.fold1_left specifically.

It was defined somewhat like this:

let fold1_left f l =

match l with

¦ [] -> invalid_arg "List.fold1_left"

¦ (h::t) -> fold_left f h t

I could create my own custom function using foldLeft but I thought that because it was already defined in F# List module before, it probably just changed the signature. And may be anyone knows how it looks like in last versions :)

By on 4/7/2010 5:39 AM ()

(Sorry, I missed the '1' when I read it last time)

The function you want is now called "List.reduce".

By on 4/7/2010 8:24 AM ()

If you mean foldl1 in Haskell, it would be List.reduce.

By on 4/6/2010 6:51 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper