示例#1
0
def zip(asker, req, a, b):
    if (properties.check_firmly(asker, is_empty(), a) or 
            properties.check_firmly(asker, is_empty(), b)):
        return asker.reply(answer=empty())
    zipped_first = T.pair(fields.get(asker, first(), a), fields.get(asker, first(), b))
    zipped_tail = zip(fields.get(asker, tail(), a), fields.get(asker, tail(), b))
    return asker.ask_tail(convert.convert(cons(zipped_first, zipped_tail), req))
示例#2
0
def generic_stripper(asker, update, property, object):
    if properties.check_firmly(asker, convert.irreducible(), representations.quote(property)):
        return asker.reply(value=keep_strip(strip=property))
示例#3
0
 def check(x):
     return properties.check_firmly(asker, req, representations.quote(x))
示例#4
0
def check_trivial_default(asker, property):
    if properties.check_firmly(asker, irreducible(), property):
        return asker.reply(answer=T.from_bool(False))