mercredi 31 décembre 2014

understanding this keyword in Alloy


Vote count:

0




In the bellow code from Alloy book, what does this keyword refer to:



module library/list [t]
sig List {}
sig NonEmptyList extends List {next: List, element: t}


...



fun List.first : t {this.element}
fun List.rest : List {this.next}
fun List.addFront (e: t): List {
{p: List | p.next = this and p.element = e}
}


I would appreciate if you give me an elaborate description of this usage in Alloy.



asked 36 secs ago

qartal

188






understanding this keyword in Alloy

Aucun commentaire:

Enregistrer un commentaire