Skip to content

Commit

Permalink
Add Projector type class
Browse files Browse the repository at this point in the history
  • Loading branch information
Primetalk committed Mar 3, 2024
1 parent c66231a commit 73de6a1
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package ru.primetalk.typed.ontology.simple.meta

trait Projector[From <: SchemaLike, To <: SchemaLike]:
val from: SchemaValueType.Aux1[From]
val to: SchemaValueType.Aux1[To]
def apply(v: from.Value): to.Value

trait Concatenator[A <: RecordSchema, B <: RecordSchema]:
val aSvt: RecordSchemaValueType[A]
val bSvt: RecordSchemaValueType[B]
val abSvt: RecordSchemaValueType[RecordSchema.Concat[A, B]]
def apply(a: aSvt.Value, b: bSvt.Value): abSvt.Value

0 comments on commit 73de6a1

Please sign in to comment.