To use String functions
Open the *string basic core library`
1:
|
|
Now all string utility functions are accessible as String.someFunction
.
Example
1: 2: |
|
Will return:
val it : string = "Hellow World"
To use BigRational functions
Open the GenUtils lib
1:
|
|
Get the greatest common divisor of two bigrational string values
1: 2: 3: 4: 5: 6: 7: 8: 9: |
|
Returns:
val it : string = "10"
1: 2: 3: 4: 5: 6: 7: |
|
Returns:
val it : string = ""
Use Continuation functions when possible
If there are continuation functions, use those instead of functions that can throw an error.
For example the BigRational.parse
function had a continuation counterpart.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
Returns:
val it : Result
= Fail [CannotParseString "blah"]
While
1:
|
|
Returns:
val it : Result
= Succ 2N
Thus, a success failure type monadic system can be build with continuation functions.
namespace Informedica
namespace Informedica.GenUtils
namespace Informedica.GenUtils.Lib
namespace Informedica.GenUtils.Lib.BCL
Multiple items
module String
from Informedica.GenUtils.Lib.BCL
Helper functions for `System.String`
--------------------
module String
from Microsoft.FSharp.Core
module String
from Informedica.GenUtils.Lib.BCL
Helper functions for `System.String`
--------------------
module String
from Microsoft.FSharp.Core
val trim : s:System.String -> string
Full name: Informedica.GenUtils.Lib.BCL.String.trim
Trim string `s`
Full name: Informedica.GenUtils.Lib.BCL.String.trim
Trim string `s`
val gcd : s1:string -> s2:string -> string
Full name: Tutorial.gcd
Full name: Tutorial.gcd
val s1 : string
val s2 : string
val s1 : BigRational
Multiple items
module BigRational
from Informedica.GenUtils.Lib
Helper functions for `BigRational`
--------------------
type BigRational
interface IComparable
override GetHashCode : unit -> int
override ToString : unit -> string
member Denominator : BigInteger
member IsNegative : bool
member IsPositive : bool
member Numerator : BigInteger
member Sign : int
member StructuredDisplayString : string
static member Abs : BigRational -> BigRational
static member FromBigInt : BigInteger -> BigRational
static member FromInt : int -> BigRational
static member Parse : string -> BigRational
static member PowN : BigRational * int -> BigRational
static member ToBigInt : BigRational -> BigInteger
static member ToDouble : BigRational -> float
static member ToInt32 : BigRational -> int
static member One : BigRational
static member Zero : BigRational
static member ( + ) : BigRational * BigRational -> BigRational
static member ( / ) : BigRational * BigRational -> BigRational
static member ( = ) : BigRational * BigRational -> bool
static member op_Explicit : BigRational -> int
static member op_Explicit : BigRational -> BigInteger
static member op_Explicit : BigRational -> float
static member ( > ) : BigRational * BigRational -> bool
static member ( >= ) : BigRational * BigRational -> bool
static member ( <> ) : BigRational * BigRational -> bool
static member ( < ) : BigRational * BigRational -> bool
static member ( <= ) : BigRational * BigRational -> bool
static member ( * ) : BigRational * BigRational -> BigRational
static member ( - ) : BigRational * BigRational -> BigRational
static member ( ~- ) : BigRational -> BigRational
static member ( ~+ ) : BigRational -> BigRational
Full name: Microsoft.FSharp.Math.BigRational
module BigRational
from Informedica.GenUtils.Lib
Helper functions for `BigRational`
--------------------
type BigRational
interface IComparable
override GetHashCode : unit -> int
override ToString : unit -> string
member Denominator : BigInteger
member IsNegative : bool
member IsPositive : bool
member Numerator : BigInteger
member Sign : int
member StructuredDisplayString : string
static member Abs : BigRational -> BigRational
static member FromBigInt : BigInteger -> BigRational
static member FromInt : int -> BigRational
static member Parse : string -> BigRational
static member PowN : BigRational * int -> BigRational
static member ToBigInt : BigRational -> BigInteger
static member ToDouble : BigRational -> float
static member ToInt32 : BigRational -> int
static member One : BigRational
static member Zero : BigRational
static member ( + ) : BigRational * BigRational -> BigRational
static member ( / ) : BigRational * BigRational -> BigRational
static member ( = ) : BigRational * BigRational -> bool
static member op_Explicit : BigRational -> int
static member op_Explicit : BigRational -> BigInteger
static member op_Explicit : BigRational -> float
static member ( > ) : BigRational * BigRational -> bool
static member ( >= ) : BigRational * BigRational -> bool
static member ( <> ) : BigRational * BigRational -> bool
static member ( < ) : BigRational * BigRational -> bool
static member ( <= ) : BigRational * BigRational -> bool
static member ( * ) : BigRational * BigRational -> BigRational
static member ( - ) : BigRational * BigRational -> BigRational
static member ( ~- ) : BigRational -> BigRational
static member ( ~+ ) : BigRational -> BigRational
Full name: Microsoft.FSharp.Math.BigRational
val parse : s:string -> BigRational
Full name: Informedica.GenUtils.Lib.BigRational.parse
Parse a string to a bigrational
Full name: Informedica.GenUtils.Lib.BigRational.parse
Parse a string to a bigrational
val s2 : BigRational
val gcd : a:BigRational -> b:BigRational -> BigRational
Full name: Informedica.GenUtils.Lib.BigRational.gcd
Get the greatest common divisor
of two bigrationals `a` and `b`
Full name: Informedica.GenUtils.Lib.BigRational.gcd
Get the greatest common divisor
of two bigrationals `a` and `b`
val toString : v:BigRational -> string
Full name: Informedica.GenUtils.Lib.BigRational.toString
Convert a bigrational to a string
Full name: Informedica.GenUtils.Lib.BigRational.toString
Convert a bigrational to a string
val gcd2 : s1:string -> s2:string -> string
Full name: Tutorial.gcd2
Full name: Tutorial.gcd2
val tryParse : s:string -> BigRational option
Full name: Informedica.GenUtils.Lib.BigRational.tryParse
Try to parse a string and
return `None` if it fails
otherwise `Some` bigrational
Full name: Informedica.GenUtils.Lib.BigRational.tryParse
Try to parse a string and
return `None` if it fails
otherwise `Some` bigrational
union case Option.Some: Value: 'T -> Option<'T>
type Result<'T,'Msg> =
| Succ of 'T
| Fail of 'Msg list
Full name: Tutorial.Result<_,_>
| Succ of 'T
| Fail of 'Msg list
Full name: Tutorial.Result<_,_>
union case Result.Succ: 'T -> Result<'T,'Msg>
union case Result.Fail: 'Msg list -> Result<'T,'Msg>
type 'T list = List<'T>
Full name: Microsoft.FSharp.Collections.list<_>
Full name: Microsoft.FSharp.Collections.list<_>
val parse : (string -> Result<BigRational,BigRational.Message>)
Full name: Tutorial.parse
Full name: Tutorial.parse
val succ : ('a -> Result<'a,'b>)
val n : 'a
val fail : ('a -> Result<'b,'a>)
val m : 'a
val parseCont : succ:(BigRational -> 'a) -> fail:(BigRational.Message -> 'a) -> s:string -> 'a
Full name: Informedica.GenUtils.Lib.BigRational.parseCont
Parse a string and pass the result
either to `succ` or `fail`
Full name: Informedica.GenUtils.Lib.BigRational.parseCont
Parse a string and pass the result
either to `succ` or `fail`