Murat Kasimov

More about me

Я language (β)

/Я language (β)/Behaviour/Check/

> Check : forall e t . t `C'AR__` t `L` Stops e `T` _

Interpretation: this label propagate computations only if it's not False/Empty/Error.

Demonstration: check if Boolean is not False:

> True `har` Unit `yok` Check `ha` True = True `har` Unit > True `har` Unit `yok` Check `ha` False = False `har` Unit > False `har` Unit `yok` Check `ha` True = False `har` Unit > False `har` Unit `yok` Check `ha` False = False `har` Unit > True `har` Unit `yok'ut` Check `ha` True `har` Unit = True `har` Unit > True `har` Unit `yok'ut` Check `ha` False `har` Unit = False `har` Unit

Demonstration: check if Maybe is not Empty:

> Exist `har'st` A `yok` Check `ha` Exist = Exist `har'st` A > Empty `har` Unit `yok` Check `ha` Exist = Empty `har` Unit > Exist `har'st` A `yok'ut` Check `ha` Exist `har'st` B = Exist `har'st` B > Exist `har'st` A `yok'ut` Check `ha` Empty `har` Unit = Empty `har` Unit > Empty `har` Unit `yok'ut` Check `ha` Exist `har'st` B = Empty `har` Unit > Empty `har` Unit `yok'ut` Check `ha` Empty `har` Unit = Empty `har` Unit

Demonstration: check if Stops is not Error:

> Valid `har'st` A `yok` Check `ha` Valid = Valid `har'st` A > Valid `har'st` A `yok'ut` Check `ha` Valid `har'st` B = Valid `har'st` B

Counterpart: label that repeatedly run computation until it's True/Exist/Valid is Retry.