Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
25
Task/Null-object/Tailspin/null-object-1.tailspin
Normal file
25
Task/Null-object/Tailspin/null-object-1.tailspin
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
templates mightBeNothing
|
||||
when <=0> do !VOID
|
||||
when <=1> do 'something' !
|
||||
end mightBeNothing
|
||||
|
||||
1 -> mightBeNothing -> 'Produced $;. ' -> !OUT::write
|
||||
|
||||
0 -> mightBeNothing -> 'Won''t execute this' -> !OUT::write
|
||||
2 -> mightBeNothing -> 'Won''t execute this' -> !OUT::write
|
||||
|
||||
// capture the transform in a list to continue computation when no result is emitted
|
||||
[1 -> mightBeNothing] -> \(
|
||||
when <=[]> 'Produced nothing. ' !
|
||||
otherwise 'Produced $(1);. ' !
|
||||
\) -> !OUT::write
|
||||
|
||||
[0 -> mightBeNothing] -> \(
|
||||
when <=[]> 'Produced nothing. ' !
|
||||
otherwise 'Produced $(1);. ' !
|
||||
\) -> !OUT::write
|
||||
|
||||
[2 -> mightBeNothing] -> \(
|
||||
when <=[]> 'Produced nothing. ' !
|
||||
otherwise 'Produced $(1);. ' !
|
||||
\) -> !OUT::write
|
||||
8
Task/Null-object/Tailspin/null-object-2.tailspin
Normal file
8
Task/Null-object/Tailspin/null-object-2.tailspin
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// throws an error
|
||||
def nothing: 0 -> mightBeNothing;
|
||||
|
||||
// throws an error
|
||||
{ nothing: 0 -> mightBeNothing }
|
||||
|
||||
// OK, simply results in the empty structure without a field called 'nothing'
|
||||
{ 0 -> mightBeNothing -> (nothing: $) }
|
||||
Loading…
Add table
Add a link
Reference in a new issue