Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

DSL #27

Open
Rovak opened this issue Jan 29, 2018 · 0 comments
Open

DSL #27

Rovak opened this issue Jan 29, 2018 · 0 comments
Assignees
Milestone

Comments

@Rovak
Copy link
Collaborator

Rovak commented Jan 29, 2018

Make a DSL similar to https://github.com/typelevel/squants

Prototype: https://scalafiddle.io/sf/wU5kTG8/3

Example

val bitcoins: Bitcoin = Satoshi(500000)
val satoshis: Satoshi = Bitcoin(2)

Bitcoin(2) == Satoshi(200000000)

val sum= Bitcoin(1) + Bitcoin(3)

val wallet = Wallet("0xjk234jlk234ljk234")
wallet send 1.bitcoin to "0xjkl345h43hjk2436kl"
@Rovak Rovak added this to the 0.1 milestone Jan 29, 2018
@Rovak Rovak self-assigned this Jan 29, 2018
@Rovak Rovak mentioned this issue Jan 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant