Skip to content

Commit

Permalink
compact
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 13, 2024
1 parent 66c4a6d commit 926a76f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/fbe/conclude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,22 @@ def Fbe.conclude(fb: Fbe.fb, judge: $judge, loog: $loog, options: $options, glob
# A concluding block.
#
# You may want to use this class when you want to go through a number
# of facts in the factbase, applying certain algorithm to each of them.
# For example, you want to check whether each issue exists in
# of facts in the factbase, applying certain algorithm to each of them
# and possibly creating new facts from them.
#
# For example, you want to make a new +good+ fact for every +bad+ fact found:
#
# require 'fbe/conclude'
# conclude do
# on '(exist bad)'
# follow 'when'
# draw on |n, b|
# n.good = 'yes!'
# end
# end
#
# This snippet will find all facts that have +bad+ property and then create
# new facts, letting the block in the {Fbe::Conclude#draw} deal with them.
#
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2024 Zerocracy
Expand Down

0 comments on commit 926a76f

Please sign in to comment.