snowflakes work except define
This commit is contained in:
+12
-5
@@ -12,7 +12,7 @@
|
||||
arity/1,
|
||||
tt/1, sf/1,
|
||||
sf_to_tt/1, tt_to_sf/1,
|
||||
eval/2,
|
||||
appl_ttf/2, appl/2,
|
||||
bfls/1,
|
||||
bfl/2
|
||||
]).
|
||||
@@ -73,11 +73,18 @@ sf(List) ->
|
||||
{sf, wfc_bm:col(List)}.
|
||||
|
||||
|
||||
-spec eval(sf() | tt(), [wfc:sentence()]) -> wfc:sentence().
|
||||
-spec appl_ttf(fun(), [wfc:sentence()]) -> wfc:sentence().
|
||||
|
||||
eval(TT = {tt, _}, Sentences) ->
|
||||
eval(tt_to_sf(TT), Sentences);
|
||||
eval(SF = {sf, SFBM}, Sentences) ->
|
||||
appl_ttf(Fun, Sentences) ->
|
||||
SF = ttfun_to_sf(Fun),
|
||||
appl(SF, Sentences).
|
||||
|
||||
|
||||
-spec appl(sf() | tt(), [wfc:sentence()]) -> wfc:sentence().
|
||||
|
||||
appl(TT = {tt, _}, Sentences) ->
|
||||
appl(tt_to_sf(TT), Sentences);
|
||||
appl(SF = {sf, SFBM}, Sentences) ->
|
||||
Arity = arity(SF),
|
||||
Arity = length(Sentences),
|
||||
% [0, 0, 0], [1, 0, 0], ...
|
||||
|
||||
Reference in New Issue
Block a user