-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed types to be reflected as objects
- Loading branch information
1 parent
f0fde2b
commit 9095cc7
Showing
19 changed files
with
280 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Converters; | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesBoolean | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
args[0].ToBoolean(); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "Boolean" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Converters; | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesCMatrix | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
args[0].ToComplex().ToMatrix(); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "CMatrix" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Converters; | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesComplex | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
args[0].ToComplex(); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "Complex" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesFunction | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
(args[0] as Function); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "Function" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Converters; | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesMatrix | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
args[0].ToNumber().ToMatrix(); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "Matrix" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Mages.Core.Runtime.Types | ||
{ | ||
using Mages.Core.Runtime.Converters; | ||
using Mages.Core.Runtime.Functions; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
static class MagesNumber | ||
{ | ||
private static readonly Function Create = new Function(args => | ||
{ | ||
return Curry.MinOne(Create, args) ?? | ||
args[0].ToNumber(); | ||
}); | ||
|
||
public static readonly IDictionary<String, Object> Type = new Dictionary<String, Object> | ||
{ | ||
{ "name", "Number" }, | ||
{ "create", Create }, | ||
}; | ||
} | ||
} |
Oops, something went wrong.