This repository was archived by the owner on May 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +27
-18
lines changed Expand file tree Collapse file tree 1 file changed +27
-18
lines changed Original file line number Diff line number Diff line change 1
- trait Slot :
2
- /**
3
- * This method is used to associate a value to a path.
4
- * @param value the value to be associated with the path
5
- * @return a tuple containing a path and the corresponding value
6
- */
7
- def -> (value : Any ): (Path , Any ) = (Path (this ), value)
8
-
9
- /**
10
- * Creates a path by concatenating this slot with the given slot.
11
- * @param slot the slot to be concatenated
12
- * @return a path
13
- */
14
- def / (slot : Slot ): Path = Path (this , slot)
1
+ /**
2
+ * This enum defines the different slots that can be used.
3
+ */
4
+ enum Slot :
5
+ case Nbr (index : Int )
6
+ case Rep (index : Int )
7
+ case FoldHood (index : Int )
8
+ case Branch (index : Int , tag : Boolean )
15
9
16
10
object Slot :
17
- final case class Nbr (index : Int ) extends Slot
18
- final case class Rep (index : Int ) extends Slot
19
- final case class FoldHood (index : Int ) extends Slot
20
- final case class Branch (index : Int , tag : Boolean ) extends Slot
11
+ extension (slot : Slot )
12
+ /**
13
+ * This method is used to associate a value to a path.
14
+ *
15
+ * @param value the value to be associated with the path
16
+ * @return a tuple containing a path and the corresponding value
17
+ */
18
+ def -> (value : Any ): (Path , Any ) = (Path (slot), value)
19
+ /**
20
+ * Creates a path by concatenating this slot with the given slot.
21
+ *
22
+ * @param slot the slot to be concatenated
23
+ * @return a path
24
+ */
25
+ def / (other : Slot ): Path = Path (slot, other)
26
+
27
+
28
+
29
+
You can’t perform that action at this time.
0 commit comments