-------------------- type List<'T> = | ( [] ) | ( :: ) of Head: 'T * Tail: 'T list interface IEnumerable interface IEnumerable<'T> member GetSlice : startIndex:int option * endIndex:int option -> 'T list member Head : 'T member IsEmpty : bool member Item : index:int -> 'T with get member Length : int member Tail : 'T list static member Cons : head:'T * tail:'T list -> 'T list static member Empty : 'T list
Full name: Microsoft.FSharp.Collections.List<_>
val filter : predicate:('T -> bool) -> list:'T list -> 'T list
Full name: Microsoft.FSharp.Collections.List.filter
val map : mapping:('T -> 'U) -> list:'T list -> 'U list
Full name: Microsoft.FSharp.Collections.List.map
val add : x:int -> y:int -> int
Full name: Index.add
val y : int
val add5 : (int -> int)
Full name: Index.add5
val newResult : int
Full name: Index.newResult
val x : 'a
val f : ('a -> 'b)
val nine : unit
Full name: Index.nine
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
val g : ('a -> 'b)
val b : int
Full name: Index.b
val thedarkside : int
Full name: Index.thedarkside
val λ : int
Full name: index.λ
val ( The output of this test shpuld = 💩 ) : int
type Bacon = | Uncooked | Chewy | Crispy
Full name: Index.Bacon
union case Bacon.Uncooked: Bacon
union case Bacon.Chewy: Bacon
union case Bacon.Crispy: Bacon
type Tree<'Data> = | Empty | Node of Tree<'Data> * 'Data * Tree<'Data>
Full name: Index.Tree<_>
namespace Microsoft.FSharp.Data
union case Tree.Empty: Tree<'Data>
union case Tree.Node: Tree<'Data> * 'Data * Tree<'Data> -> Tree<'Data>
val baconTree : Tree<Bacon>
Full name: Index.baconTree
type value = | Bool of bool | Int of int | Double of double | String of string
Full name: Index.value
union case value.Bool: bool -> value
type bool = System.Boolean
Full name: Microsoft.FSharp.Core.bool
union case value.Int: int -> value
Multiple items val int : value:'T -> int (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.int
-------------------- type int = int32
Full name: Microsoft.FSharp.Core.int
-------------------- type int<'Measure> = int
Full name: Microsoft.FSharp.Core.int<_>
union case value.Double: double -> value
Multiple items val double : value:'T -> double (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.double
-------------------- type double = System.Double
Full name: Microsoft.FSharp.Core.double
Multiple items union case value.String: string -> value
type expression = | Literal of value | Var of identifier | GetAt of location | Func of invoke | Neg of expression | Arithmetic of expression * arithmetic * expression | Comparison of expression * comparison * expression | Logical of expression * logical * expression
Full name: Index.expression
Multiple items union case expression.Literal: value -> expression
-------------------- type LiteralAttribute = inherit Attribute new : unit -> LiteralAttribute
Full name: Microsoft.FSharp.Core.LiteralAttribute
-------------------- new : unit -> LiteralAttribute
union case expression.Var: identifier -> expression
union case expression.GetAt: location -> expression
union case expression.Func: invoke -> expression
union case expression.Neg: expression -> expression
union case expression.Arithmetic: expression * arithmetic * expression -> expression
union case expression.Comparison: expression * comparison * expression -> expression
union case expression.Logical: expression * logical * expression -> expression
type label = string
Full name: Index.label
type assign = | Set of identifier * expression
Full name: Index.assign
Multiple items union case assign.Set: identifier * expression -> assign
-------------------- module Set
from Microsoft.FSharp.Collections
-------------------- type Set<'T (requires comparison)> = interface IComparable interface IEnumerable interface IEnumerable<'T> interface ICollection<'T> new : elements:seq<'T> -> Set<'T> member Add : value:'T -> Set<'T> member Contains : value:'T -> bool override Equals : obj -> bool member IsProperSubsetOf : otherSet:Set<'T> -> bool member IsProperSupersetOf : otherSet:Set<'T> -> bool ...
Full name: Microsoft.FSharp.Collections.Set<_>
-------------------- new : elements:seq<'T> -> Set<'T>
type instruction = | Assign of assign | SetAt of location * expression | PropertySet of string * string * expression | Action of invoke | For of assign * expression * expression | EndFor | If of expression | ElseIf of expression | Else | EndIf ...
Full name: Index.instruction
union case instruction.Assign: assign -> instruction
union case instruction.SetAt: location * expression -> instruction
union case instruction.PropertySet: string * string * expression -> instruction
union case instruction.Action: invoke -> instruction
union case instruction.For: assign * expression * expression -> instruction
union case instruction.EndFor: instruction
union case instruction.If: expression -> instruction
union case instruction.ElseIf: expression -> instruction
union case instruction.Else: instruction
union case instruction.EndIf: instruction
union case instruction.While: expression -> instruction
union case instruction.EndWhile: instruction
union case instruction.Sub: identifier -> instruction
union case instruction.EndSub: instruction
union case instruction.GoSub: identifier -> instruction
union case instruction.Label: label -> instruction
union case instruction.Goto: label -> instruction
namespace FParsec
module CharParsers
from FParsec
module Primitives
from FParsec
namespace System
val ptrue : Parser<bool,unit>
Full name: Index.ptrue
val pstring : string -> Parser<string,'u>
Full name: FParsec.CharParsers.pstring
val pfalse : Parser<bool,unit>
Full name: Index.pfalse
val pbool : Parser<value,unit>
Full name: Index.pbool
val x : bool
val pint : Parser<value,unit>
Full name: Index.pint
val pint32 : Parser<int32,'u>
Full name: FParsec.CharParsers.pint32
val n : int32
val pvalue : Parser<value,unit>
Full name: Index.pvalue
val pliteral : Parser<expression,unit>
Full name: Index.pliteral
val x : value
val result : ParserResult<bool,unit>
Full name: Index.result
val run : Parser<'Result,unit> -> string -> ParserResult<'Result,unit>
Full name: FParsec.CharParsers.run
val eval : expr:expression -> value
Full name: Index.eval
val expr : expression
Multiple items val value : value
-------------------- type value = | Bool of bool | Int of int | Double of double | String of string
Full name: Index.value
val expr1 : expression
Multiple items val logical : logical
-------------------- type logical = | Or | And | OrElse | AndAlso
Full name: Index.logical
val expr2 : expression
val a : bool
val b : bool
val a : int
val b : int
type Convert = static val DBNull : obj static member ChangeType : value:obj * typeCode:TypeCode -> obj + 3 overloads static member FromBase64CharArray : inArray:char[] * offset:int * length:int -> byte[] static member FromBase64String : s:string -> byte[] static member GetTypeCode : value:obj -> TypeCode static member IsDBNull : value:obj -> bool static member ToBase64CharArray : inArray:byte[] * offsetIn:int * length:int * outArray:char[] * offsetOut:int -> int + 1 overload static member ToBase64String : inArray:byte[] -> string + 3 overloads static member ToBoolean : value:obj -> bool + 17 overloads static member ToByte : value:obj -> byte + 18 overloads ...
Full name: System.Convert
Convert.ToBoolean(value: DateTime) : bool (+0 other overloads) Convert.ToBoolean(value: decimal) : bool (+0 other overloads) Convert.ToBoolean(value: float) : bool (+0 other overloads) Convert.ToBoolean(value: float32) : bool (+0 other overloads) Convert.ToBoolean(value: string) : bool (+0 other overloads) Convert.ToBoolean(value: uint64) : bool (+0 other overloads) Convert.ToBoolean(value: int64) : bool (+0 other overloads) Convert.ToBoolean(value: uint32) : bool (+0 other overloads) Convert.ToBoolean(value: int) : bool (+0 other overloads) Convert.ToBoolean(value: uint16) : bool (+0 other overloads)
val failwith : message:string -> 'T
Full name: Microsoft.FSharp.Core.Operators.failwith
val s : string
type Int32 = struct member CompareTo : value:obj -> int + 1 overload member Equals : obj:obj -> bool + 1 overload member GetHashCode : unit -> int member GetTypeCode : unit -> TypeCode member ToString : unit -> string + 3 overloads static val MaxValue : int static val MinValue : int static member Parse : s:string -> int + 3 overloads static member TryParse : s:string * result:int -> bool + 1 overload end
type Double = struct member CompareTo : value:obj -> int + 1 overload member Equals : obj:obj -> bool + 1 overload member GetHashCode : unit -> int member GetTypeCode : unit -> TypeCode member ToString : unit -> string + 3 overloads static val MinValue : float static val MaxValue : float static val Epsilon : float static val NegativeInfinity : float static val PositiveInfinity : float ... end
val sprintf : format:Printf.StringFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.sprintf
active recognizer Float: string -> float option
Full name: Index.( |Float|_| )
namespace System.Drawing
val col : Color
type Color = struct member A : byte member B : byte member Equals : obj:obj -> bool member G : byte member GetBrightness : unit -> float32 member GetHashCode : unit -> int member GetHue : unit -> float32 member GetSaturation : unit -> float32 member IsEmpty : bool member IsKnownColor : bool ... end
Full name: System.Drawing.Color
property Color.R: byte
property Color.G: byte
property Color.B: byte
Color.GetHue() : float32
Color.GetSaturation() : float32
Color.GetBrightness() : float32
val checkColour : c:Color -> string
Full name: Index.checkColour
val c : Color
active recognizer HSB: Color -> float32 * float32 * float32
Full name: Index.( |HSB| )
val h : float32
val s : float32
val b : float32
active recognizer RGB: Color -> byte * byte * byte
Full name: Index.( |RGB| )
val r : byte
val g : byte
val b : byte
val b : Bacon
val baconresult : string
Full name: Index.baconresult
active recognizer Delicious: Bacon -> Choice<string,int>
Full name: Index.( |Delicious|Eww| )
active recognizer Eww: Bacon -> Choice<string,int>
Full name: Index.( |Delicious|Eww| )
val temp : int
Multiple items type MeasureAttribute = inherit Attribute new : unit -> MeasureAttribute
Full name: Microsoft.FSharp.Core.MeasureAttribute
-------------------- new : unit -> MeasureAttribute
[<Measure>] type m
Full name: Index.m
[<Measure>] type s
Full name: Index.s
[<Measure>] type kg
Full name: Index.kg
val distance : float<m>
Full name: Index.distance
val time : float<s>
Full name: Index.time
val velocity : float<m/s>
Full name: Index.velocity
val initialVelocity : float<m/s>
Full name: Index.initialVelocity
val mass : float<kg>
Full name: Index.mass
val acceleration : float<m/s ^ 2>
Full name: Index.acceleration
val force : float<kg m/s ^ 2>
Full name: Index.force
[<Measure>] type N = kg m/s ^ 2
Full name: Index.N
val forceDifference : float<kg m/s ^ 2>
Full name: Index.forceDifference
val momentum : float<kg m/s>
Full name: Index.momentum
Multiple items val float : value:'T -> float (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float
-------------------- type float = Double
Full name: Microsoft.FSharp.Core.float
-------------------- type float<'Measure> = float
Full name: Microsoft.FSharp.Core.float<_>
[<Measure>] type C
Full name: Index.C
[<Measure>] type F
Full name: Index.F
val CtoF : c:float<C> -> float<F>
Full name: Index.CtoF
val c : float<C>
val Far : float<F>
Full name: Index.Far
val urls : seq<string>
Full name: Index.urls
Multiple items val seq : sequence:seq<'T> -> seq<'T>
Full name: Microsoft.FSharp.Core.Operators.seq
-------------------- type seq<'T> = Collections.Generic.IEnumerable<'T>
Full name: Microsoft.FSharp.Collections.Seq.toList
namespace System.Net
namespace System.Net.Http
val longRunning : url:string -> Async<HttpResponseMessage>
Full name: Index.longRunning
val url : string
val async : AsyncBuilder
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.async
val client : HttpClient
Multiple items type HttpClient = inherit HttpMessageInvoker new : unit -> HttpClient + 2 overloads member BaseAddress : Uri with get, set member CancelPendingRequests : unit -> unit member DefaultRequestHeaders : HttpRequestHeaders member DeleteAsync : requestUri:string -> Task<HttpResponseMessage> + 3 overloads member GetAsync : requestUri:string -> Task<HttpResponseMessage> + 7 overloads member GetByteArrayAsync : requestUri:string -> Task<byte[]> + 1 overload member GetStreamAsync : requestUri:string -> Task<Stream> + 1 overload member GetStringAsync : requestUri:string -> Task<string> + 1 overload member MaxResponseContentBufferSize : int64 with get, set ...
Full name: System.Net.Http.HttpClient
-------------------- HttpClient() : unit HttpClient(handler: HttpMessageHandler) : unit HttpClient(handler: HttpMessageHandler, disposeHandler: bool) : unit
val result : HttpResponseMessage
Multiple items type Uri = new : uriString:string -> Uri + 5 overloads member AbsolutePath : string member AbsoluteUri : string member Authority : string member DnsSafeHost : string member Equals : comparand:obj -> bool member Fragment : string member GetComponents : components:UriComponents * format:UriFormat -> string member GetHashCode : unit -> int member GetLeftPart : part:UriPartial -> string ...
Full name: System.Uri
-------------------- Uri(uriString: string) : unit Uri(uriString: string, uriKind: UriKind) : unit Uri(baseUri: Uri, relativeUri: string) : unit Uri(baseUri: Uri, relativeUri: Uri) : unit
Multiple items type MaybeBuilder = new : unit -> MaybeBuilder member Bind : m:'b option * f:('b -> 'c option) -> 'c option member Return : x:'a -> 'a option
function copyWithEvaluation(iElem, elem) {
returnfunction (obj) {
var newObj = {};
for (var p in obj) {
var v = obj[p];
if (typeof v ==="function") {
v = v(iElem, elem);
}
newObj[p] = v;
}
if (!newObj.exactTiming) {
newObj.delay += exports._libraryDelay;
}
return newObj;
};
}
Haskell
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
recur_count k =1 : 1 :
zipWith recurAdd (recur_count k) (tail (recur_count k))
where recurAdd x y = k * x + y
main =do
argv <- getArgs
inputFile <- openFile (head argv) ReadMode
line <- hGetLine inputFile
let [n,k] = map read (words line)
printf "%d\n" ((recur_count k) !! (n-1))
object Pi {
class PiIterator extends Iterable[BigInt]{
var r:BigInt=0
var q, t, k:BigInt=1
var n, l:BigInt=3
var nr, nn:BigInt=0
//...
}
def main(args: Array[String]): Unit = {
val it=new PiIterator
println((it head) + "." + (it take 300 mkString))
}
}