Enable support for types' properties
This commit is contained in:
@@ -3,7 +3,6 @@ from functools import reduce
|
||||
from smnp.library.model import Function
|
||||
from smnp.library.signature import varargSignature, ofTypes
|
||||
from smnp.type.model import Type
|
||||
from smnp.type.value import Value
|
||||
|
||||
_signature = varargSignature(ofTypes(Type.LIST))
|
||||
def _function(env, vararg):
|
||||
@@ -11,7 +10,7 @@ def _function(env, vararg):
|
||||
return vararg[0]
|
||||
|
||||
combined = reduce(lambda x, y: x.value + y.value, vararg)
|
||||
return Value(Type.LIST, combined)
|
||||
return Type.list(combined)
|
||||
|
||||
|
||||
function = Function(_signature, _function, 'combine')
|
||||
|
||||
Reference in New Issue
Block a user