diff options
| author | Mishio595 <[email protected]> | 2018-11-25 16:02:37 -0700 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-11-25 16:02:37 -0700 |
| commit | 011e3224c0292dfcb0024daf474d4ef1e00b82f0 (patch) | |
| tree | a04caad1d49ee4092cfb3bb3506ad5dba85120a4 /lib/models/snowflake.ml | |
| parent | Major structural changes (diff) | |
| download | disml-011e3224c0292dfcb0024daf474d4ef1e00b82f0.tar.xz disml-011e3224c0292dfcb0024daf474d4ef1e00b82f0.zip | |
A lot is going on...
Diffstat (limited to 'lib/models/snowflake.ml')
| -rw-r--r-- | lib/models/snowflake.ml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/models/snowflake.ml b/lib/models/snowflake.ml new file mode 100644 index 0000000..ed80b62 --- /dev/null +++ b/lib/models/snowflake.ml @@ -0,0 +1,16 @@ +type t = { + id: int; + as_string: string; +} + +let to_int t = t.id +let to_string t = t.as_string + +let from_int i = { + id = i; + as_string = string_of_int i; +} +let from_string s = { + id = int_of_string s; + as_string = s; +}
\ No newline at end of file |