Well it does not seem to typecheck unless I comment out "evs".

: becomes ::

\ becomes fun

name@pat becomes "pat as name"

as becomes az, since we just saw "as" is a keyword

"blah where blarg" becomes "blarg; blah"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(*
integral fb = 
\ts@(t:ts') -> 0 : loop t 0 ts' (fb ts) 
where loop t0 acc (t1:ts) (a:as) 
= let acc' = acc + (t1-t0)*a 
in acc' : loop t1 acc' evs ts as 
*)
 
let integral fb = 
    let rec loop t0 acc (t1::ts) (a::az) =
        let acc' = acc + (t1-t0)*a 
        acc' :: loop t1 acc' (*evs*) ts az
    (fun ((t::ts') as ts) -> 0 :: loop t 0 ts' (fb ts))
 
By on 7/18/2010 5:49 PM ()

Although a bit obtuse to the untrained eye, I do prefer the Haskell syntax.

By on 6/23/2012 3:39 PM ()

@brianmcn

thnx

Saagar

By on 7/19/2010 7:51 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us
Built with WebSharper