context shop.orders

consumes bynk { Clock }

capability Stamp {
  fn make() -> Effect[Int]
}

provides Stamp = ClockStamp given Clock {
  fn make() -> Effect[Int] {
    let t <- Clock.now()
    t.toEpochMillis()
  }
}

service ordering {
  on call(sku: String) -> Effect[Int] given Stamp {
    let placedAt <- Stamp.make()
    placedAt
  }
}
