Murat Kasimov

More about me

Я language (β)

/Я language (β)/Morphisms/shift/

Some primitives have a window inside that you can shift. Direction for shifting per each primitive is defined by Shifter.

> shift : Shifter List `AR_____` Supertype ( Event `T'I` Scrolling List i `T'I` Maybe ( Alone i ) ) > shift : Shifter Tree `AR_____` Supertype ( Event `T'I` Scrolling Tree i `T'I` Maybe ( Alone i ) ) > shift : Shifter List `AR_____` Supertype ( Event `T'I` Sliding List i `T'I` Maybe ( List i ) )

If you can shift towards chosen direction - it results with updated state and Exist updated window:

> shift `hc'st` Right `hc` [ [ ] , [ A ] , [ B , C ] ] = Exist `hc` [ B ] `hjd` [ [ A ] , [ B ] , [ C ] ]

If there is nowhere to move (no items) - state doesn't change and result is Empty:

> shift `hc'st` Left `hc` [ [ ] , [ A ] , [ B , C ] ] = Empty `hc` Unit `hjd` [ [ ] , [ A ] , [ B , C ] ]