-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Vincent Aravantinos edited this page Jul 11, 2017
·
7 revisions
Soit la structure suivante :
A : { b : B }
B : { c :> C }
C : { name : String, d :> D }
D : { city : String }
Avec l'exemple suivant :
a =
{ b = [
{ c = id1 },
{ c = id2 },
{ c = id3 }
]
}
id1 = { name = "123", d = id4 }
id2 = { name = "Vincent", d = id5 }
id3 = { name = "", d = id6 }
id4 = { city = "456" }
id5 = { city = "86153" }
id6 = { city = "86150" }
Binding 1:
\c:C ->
if c.name != ""
then c.name
else c.d.city
Binding 2:
\a ->
a.b.mapFilter (\b ->
case intOfString(binding1(b.c).get())
Just n ->
Just stringOfInt (n+1)
Nothing ->
Nothing
)
+-----------+
| [ 124 ] |
| [ 86151 ] |
+-----------+
Issues #11-#18 describe various scenarios of adding or changing various elements on server and client side.
- binding needs to access other binding results