**** New globals: {A:i4, B:i4?, P:(r8, i4, i2, {X:i4})?*, R:{A:r8, S:{X:i4}, X:i4, Y:i2}, T:{A:r8, B:r8?, S:{X:i4}, X:i4, Y:i2}?*}

> GuardMap([1,2,3], it * 2) // Baseline whether we expand over tuples.
GuardMap([1, 2, 3], it * 2) : i8*
Binder : ForEach(*1: [1, 2, 3], Guard(!2: *1, Mul(!2, 2)))
Reducer: ForEach(*1: [1, 2, 3], Mul(*1, 2))
###
> GuardMap(x : [1,2,3], x * 2)
GuardMap(x : [1, 2, 3], x * 2) : i8*
Binder : ForEach(*1: [1, 2, 3], Guard(!2: *1, Mul(!2, 2)))
Reducer: ForEach(*1: [1, 2, 3], Mul(*1, 2))
###
> GuardMap([[1,2,3], [4,5]], it * 2)
GuardMap([[1, 2, 3], [4, 5]], it * 2) : i8**
Binder : ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Guard(!3: *2, Mul(!3, 2))))
Reducer: ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Mul(*2, 2)))
###
> GuardMap([[1,2,3], [4,5]], it$0 * Count(it$2)) // Error - don't see the injected map scope.
GuardMap([[1, 2, 3], [4, 5]], it * Count(it$2)) : i8**
Binder : ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Guard(!3: *2, Mul(!3, Count(*1)))))
Reducer: ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Mul(*2, Count(*1))))
Hoister: ForEach(*1: [[1, 2, 3], [4, 5]], With(!2: Count(*1), ForEach(*3: *1, Mul(!2, *3))))
###
> Map(a: [[1,2,3], [4,5]], GuardMap(b: a, b * Count(a))) // Alternative.
Map(a : [[1, 2, 3], [4, 5]], GuardMap(b : a, b * Count(a))) : i8**
Binder : ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Guard(!3: *2, Mul(!3, Count(*1)))))
Reducer: ForEach(*1: [[1, 2, 3], [4, 5]], ForEach(*2: *1, Mul(*2, Count(*1))))
Hoister: ForEach(*1: [[1, 2, 3], [4, 5]], With(!2: Count(*1), ForEach(*3: *1, Mul(!2, *3))))
###
> GuardMap(T, A)
GuardMap(T, A) : r8?*
Binder : ForEach(*1: T, Guard(?2: *1, ?2.A))
###
> WithMap(T, A)
WithMap(T, A) : r8?*
Binder : ForEach(*1: T, With(!2: *1, Guard(?3: !2, ?3.A)))
Reducer: ForEach(*1: T, Guard(?2: *1, ?2.A))
###
> GuardMap(T, A ?? 3)
GuardMap(T, A ?? 3) : r8?*
*** Warning: (12,13) Node: A, Message: Coalesce operator '??' is not necessary with left operand of non optional type: 'r8'
Binder : ForEach(*1: T, Guard(?2: *1, ?2.A))
###
> WithMap(T, A ?? 3)
WithMap(T, A ?? 3) : r8*
Binder : ForEach(*1: T, With(!2: *1, Coalesce(Guard(?3: !2, ?3.A), 3)))
Reducer: ForEach(*1: T, Coalesce(Guard(?2: *1, ?2.A), 3))
###
> GuardMap(T, B, B ?? 3)
GuardMap(T, B, B ?? 3) : r8?*
*** Warning: (15,16) Node: B, Message: Coalesce operator '??' is not necessary with left operand of non optional type: 'r8'
Binder : ForEach(*1: T, Guard(?2: *1, ?3: ?2.B, ?3))
Reducer: ForEach(*1: T, Guard(?2: *1, ?2.B))
###
> WithMap(T, B, B ?? 3)
WithMap(T, B, B ?? 3) : r8*
Binder : ForEach(*1: T, With(!2: *1, !4: Guard(?3: !2, ?3.B), Coalesce(!4, 3)))
Reducer: ForEach(*1: T, Coalesce(Guard(?2: *1, ?2.B), 3))
###
> GuardMap(P, Item0)
GuardMap(P, Item0) : r8?*
Binder : ForEach(*1: P, Guard(?2: *1, Tuple.Item0*(?2)))
Reducer: ForEach(*1: P, Guard(?2: *1, ?2.0))
###
> WithMap(P, Item0)
WithMap(P, Item0) : r8?*
Binder : ForEach(*1: P, With(!2: *1, Guard(?3: !2, Tuple.Item0*(?3))))
Reducer: ForEach(*1: P, Guard(?2: *1, ?2.0))
###
> GuardMap(P, Item0 ?? 3)
GuardMap(P, Item0 ?? 3) : r8?*
*** Warning: (12,17) Node: Item0, Message: Coalesce operator '??' is not necessary with left operand of non optional type: 'r8'
Binder : ForEach(*1: P, Guard(?2: *1, Tuple.Item0*(?2)))
Reducer: ForEach(*1: P, Guard(?2: *1, ?2.0))
###
> WithMap(P, Item0 ?? 3)
WithMap(P, Item0 ?? 3) : r8*
Binder : ForEach(*1: P, With(!2: *1, Coalesce(Guard(?3: !2, Tuple.Item0*(?3)), 3)))
Reducer: ForEach(*1: P, Coalesce(Guard(?2: *1, ?2.0), 3))
###
> T->{A} // Match
T->{ A } : {A:r8}?*
Binder : ForEach(*1: T, Guard(?2: *1, {A:?2.A}))
###
> GuardMap(T, {A})
GuardMap(T, { A }) : {A:r8}?*
Binder : ForEach(*1: T, Guard(?2: *1, {A:?2.A}))
###
> WithMap(T, {A})
WithMap(T, { A }) : {A:r8?}*
Binder : ForEach(*1: T, With(!2: *1, {A:Guard(?3: !2, ?3.A)}))
Reducer: ForEach(*1: T, {A:Guard(?2: *1, ?2.A)})
###
> T->{A, S} // Match
T->{ A, S } : {A:r8, S:{X:i4}}?*
Binder : ForEach(*1: T, Guard(?2: *1, {A:?2.A, S:?2.S}))
###
> GuardMap(T, {A, S})
GuardMap(T, { A, S }) : {A:r8, S:{X:i4}}?*
Binder : ForEach(*1: T, Guard(?2: *1, {A:?2.A, S:?2.S}))
###
> WithMap(T, {A, S})
WithMap(T, { A, S }) : {A:r8?, S:{X:i4}?}*
Binder : ForEach(*1: T, With(!2: *1, {A:Guard(?3: !2, ?3.A), S:Guard(?4: !2, ?4.S)}))
Reducer: ForEach(*1: T, {A:Guard(?2: *1, ?2.A), S:Guard(?3: *1, ?3.S)})
###
> T | [First(_), null]->{A} // Match. Constant folds the null.
T | [First(_), null]->{ A } : {A:r8}?*
Binder : ForEach(*1: [First*(T), null], Guard(?2: *1, {A:?2.A}))
Reducer: ForEach(*1: [TakeOne(T), null], Guard(?2: *1, {A:?2.A}))
###
> T | [First(_), null] | GuardMap(_, { A})
T | [First(_), null] | GuardMap(_, { A }) : {A:r8}?*
Binder : ForEach(*1: [First*(T), null], Guard(?2: *1, {A:?2.A}))
Reducer: ForEach(*1: [TakeOne(T), null], Guard(?2: *1, {A:?2.A}))
###
> T | [First(_), null] | WithMap(_, { A})
T | [First(_), null] | WithMap(_, { A }) : {A:r8?}*
Binder : ForEach(*1: [First*(T), null], With(!2: *1, {A:Guard(?3: !2, ?3.A)}))
Reducer: ForEach(*1: [TakeOne(T), null], {A:Guard(?2: *1, ?2.A)})
###
> R | [_, null]->{A} // Match. Constant folds the null.
R | [_, null]->{ A } : {A:r8}?*
Binder : ForEach(*1: [Ref<{A:r8, S:{X:i4}, X:i4, Y:i2}?>(R), null], Guard(?2: *1, {A:?2.A}))
###
> R | [_, null] | GuardMap(_, { A})
R | [_, null] | GuardMap(_, { A }) : {A:r8}?*
Binder : ForEach(*1: [Ref<{A:r8, S:{X:i4}, X:i4, Y:i2}?>(R), null], Guard(?2: *1, {A:?2.A}))
###
> R | [_, null] | WithMap(_, { A})
R | [_, null] | WithMap(_, { A }) : {A:r8?}*
Binder : ForEach(*1: [Ref<{A:r8, S:{X:i4}, X:i4, Y:i2}?>(R), null], With(!2: *1, {A:Guard(?3: !2, ?3.A)}))
Reducer: ForEach(*1: [Ref<{A:r8, S:{X:i4}, X:i4, Y:i2}?>(R), null], {A:Guard(?2: *1, ?2.A)})
###
> GuardMap(["hello", null], Text.Len(it)) // Result is i4?* since null maps to null.
GuardMap(["hello", null], Text.Len(it)) : i8?*
Binder : ForEach(*1: ["hello", str(<null>)], Guard(?2: *1, Text.Len(?2)))
###
> WithMap(["hello", null], Text.Len(it)) // Result is i4* since null is not mapped.
WithMap(["hello", null], Text.Len(it)) : i8*
Binder : ForEach(*1: ["hello", str(<null>)], With(!2: *1, Text.Len(!2)))
Reducer: ForEach(*1: ["hello", str(<null>)], Text.Len(*1))
###
> GuardMap(-42, it * it)
GuardMap(-42, it * it) : i8
Binder : Guard(!1: -42, Mul(!1, !1))
Reducer: 1764
###
> WithMap(-42, it * it)
WithMap(-42, it * it) : i8
Binder : With(!1: -42, Mul(!1, !1))
Reducer: 1764
###
> GuardMap(Opt (-42), it * it)
GuardMap(Opt(-42), it * it) : i8?
Binder : Guard(?1: Opt*(-42), Mul(?1, ?1))
Reducer: Opt<i8?>(1764)
###
> GuardMap(Null(-42), it * it)
GuardMap(Null(-42), it * it) : i8?
Binder : Guard(?1: DefOpt*(-42), Mul(?1, ?1))
Reducer: null
###
> WithMap(Opt (-42), it * it)
WithMap(Opt(-42), it * it) : i8?
Binder : With(!1: Opt*(-42), Guard(?2: !1, ?3: !1, Mul(?2, ?3)))
Reducer: Opt<i8?>(1764)
###
> WithMap(Null(-42), it * it)
WithMap(Null(-42), it * it) : i8?
Binder : With(!1: DefOpt*(-42), Guard(?2: !1, ?3: !1, Mul(?2, ?3)))
Reducer: null
###
