comparison nworker.rhope @ 87:3c4325e6298f

Add First@Dictionary (need to find mem man bug)
author Mike Pavone <pavone@retrodev.com>
date Fri, 30 Jul 2010 01:48:59 -0400
parents 27bb051d631c
children 5a195ee08eac
comparison
equal deleted inserted replaced
83:27bb051d631c 87:3c4325e6298f
1449 } 1449 }
1450 } 1450 }
1451 1451
1452 Register Builtins@NProgram[prog:out] 1452 Register Builtins@NProgram[prog:out]
1453 { 1453 {
1454 registered <- [[[[[[[prog]Register Worker["Print", "rhope", 1, 1] 1454 registered <- [[[[[[[[prog]Register Worker["Print", "rhope", 1, 1]
1455 ]Register Worker["If@Boolean", "rhope", 1, 2] 1455 ]Register Worker["If@Boolean", "rhope", 1, 2]
1456 ]Register Worker["Build", "rhope", 1, 1] 1456 ]Register Worker["Build", "rhope", 1, 1]
1457 ]Register Worker["Blueprint Of", "rhope", 1, 1] 1457 ]Register Worker["Blueprint Of", "rhope", 1, 1]
1458 ]Register Worker["Call@Worker", "rhope", 1, 2] //We're using 2 because we need to assume that the outputs are conditional 1458 ]Register Worker["Call@Worker", "rhope", 1, 2] //We're using 2 because we need to assume that the outputs are conditional
1459 ]Register Worker["ID", "rhope", 1, 1] 1459 ]Register Worker["ID", "rhope", 1, 1]
1460 ]Register Worker["Blueprint From ID", "rhope", 1, 2]
1460 ]Register Number Methods 1461 ]Register Number Methods
1461 1462
1462 out <- [[[[[[registered]Bind Worker["If@Boolean", 1463 out <- [[[[[[[registered]Bind Worker["If@Boolean",
1463 [[[[[NWorker["rhope"] 1464 [[[[[NWorker["rhope"]
1464 ]Inputs <<[("condition")] 1465 ]Inputs <<[("condition")]
1465 ]Input Types <<[ [()]Append[Type Instance["Boolean"]] ] 1466 ]Input Types <<[ [()]Append[Type Instance["Boolean"]] ]
1466 ]Outputs <<[("isyes","isno")] 1467 ]Outputs <<[("isyes","isno")]
1467 ]Output Types <<[ [[()]Append[Type Instance["Boolean"]]]Append[Type Instance["Boolean"]] ] 1468 ]Output Types <<[ [[()]Append[Type Instance["Boolean"]]]Append[Type Instance["Boolean"]] ]
1499 ]Inputs <<[("bp")] 1500 ]Inputs <<[("bp")]
1500 ]Input Types <<[ [()]Append[Type Instance["Blueprint"]]] 1501 ]Input Types <<[ [()]Append[Type Instance["Blueprint"]]]
1501 ]Outputs <<[("id")] 1502 ]Outputs <<[("id")]
1502 ]Output Types <<[ [()]Append[Type Instance["UInt32"]]] 1503 ]Output Types <<[ [()]Append[Type Instance["UInt32"]]]
1503 ]Builtin? << [Yes]] 1504 ]Builtin? << [Yes]]
1505 ]Bind Worker["Blueprint From ID",
1506 [[[[[NWorker["rhope"]
1507 ]Inputs <<[("id")]
1508 ]Input Types <<[ [()]Append[Type Instance["UInt32"]]]
1509 ]Outputs <<[("bp","none")]
1510 ]Output Types <<[ [[()]Append[Type Instance["Blueprint"]]]Append[Type Instance["Any Type"]]]
1511 ]Builtin? << [Yes]]
1504 } 1512 }
1505 1513
1506 Find Worker@NProgram[prog, name:out,notfound] 1514 Find Worker@NProgram[prog, name:out,notfound]
1507 { 1515 {
1508 out,notfound <- [[prog]Worker Refs >>]Index[name] 1516 out,notfound <- [[prog]Worker Refs >>]Index[name]