public string VisitMutableBox(MutableBoxDatum d) { if (boxReferences.BoxesReferenced.ContainsKey(d)) { if (boxesStarted.Contains(d)) { return("#b[" + boxReferences.BoxesReferenced[d].Visit(this) + "]"); } else { boxesStarted = boxesStarted.Add(d); return("#b[" + boxReferences.BoxesReferenced[d].Visit(this) + "]=" + d.Content.Visit(this)); } } else { return("#b=" + d.Content.Visit(this)); } }
public static IEnumerable <JoinResult <Datum, bool, Option <Datum> > > FullJoin(SetDatum left, DictionaryDatum right) { SetDatum keys = SetDatum.Union(left, right.Keys); return(keys.Select(k => new JoinResult <Datum, bool, Option <Datum> >(k, left.Contains(k), right.TryGet(k)))); }
public static IEnumerable <JoinResult <Datum, bool, Datum> > RightJoin(SetDatum left, DictionaryDatum right) { return(right.Keys.Select(k => new JoinResult <Datum, bool, Datum>(k, left.Contains(k), right[k]))); }
public static IEnumerable <JoinResult <Datum, Datum, bool> > LeftJoin(DictionaryDatum left, SetDatum right) { return(left.Keys.Select(k => new JoinResult <Datum, Datum, bool>(k, left[k], right.Contains(k)))); }
public static IEnumerable <JoinResult <Datum, bool, bool> > FullJoin(SetDatum left, SetDatum right) { SetDatum keys = SetDatum.Union(left, right); return(keys.Select(k => new JoinResult <Datum, bool, bool>(k, left.Contains(k), right.Contains(k)))); }
public static IEnumerable <JoinResult <Datum, bool, Nothing> > RightJoin(SetDatum left, SetDatum right) { return(right.Select(k => new JoinResult <Datum, bool, Nothing>(k, left.Contains(k), Nothing.Value))); }
public static IEnumerable <JoinResult <Datum, Nothing, bool> > LeftJoin(SetDatum left, SetDatum right) { return(left.Select(k => new JoinResult <Datum, Nothing, bool>(k, Nothing.Value, right.Contains(k)))); }