| 83 | | For 'JAny', values are simply collapsed into @Set@s (duplicate values are |
| 84 | | discarded). |
| 85 | | |
| 86 | | For 'JOne', newly-created duplicates are extracted from the combined list of |
| 87 | | values and moved into the combined set of duplicates. |
| | 83 | For 'Pugs.Internals.JAny', values are simply collapsed into @Set@s (duplicate |
| | 84 | values are discarded). |
| | 85 | |
| | 86 | For 'Pugs.Internals.JOne', newly-created duplicates are extracted from the |
| | 87 | combined list of values and moved into the combined set of duplicates. |
| 109 | | This function scans through the list of 'ApplyArg's, finds any that are |
| 110 | | uncollapsed junctions, and transposes the \'sub call with junction argument\' |
| 111 | | into \'junction of sub calls with non-junction arguments\'. It then recursively |
| 112 | | applies itself to each of those newly-created \'threads\', so ultimately all |
| 113 | | the call's arguments are properly collapsed. |
| | 109 | This function scans through the list of 'ApplyArg's, finds the first |
| | 110 | uncollapsed junction, and transposes e.g. @foo($a|$b|$c)@ into |
| | 111 | @( foo($a) | foo($b) | foo($c) )@. |
| | 112 | |
| | 113 | It then recursively applies itself to each of those newly-created \'threads\', |
| | 114 | so ultimately all the call's arguments are properly collapsed. |
| 118 | | Once all the args /are/ collapsed, we call our first argument with the final, |
| 119 | | collapsed args. This happens once for each possible combination of (collapsed) |
| 120 | | arguments. |
| | 119 | Once all the args /are/ collapsed, we call the (Haskell) function that |
| | 120 | 'juncApply'\'s was given, passing to it the final list of collapsed args. |
| | 121 | This happens once for /each/ possible combination of (collapsed) arguments. |
| | 122 | The function is expected to perform the actual subroutine call. |