Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Retract (load ?filename) and (require ?filename) facts

immediately after they are handled.

This allows us to send them over again
  • Loading branch information...
commit 402e936977bcff85b6c4c98e07e1fd9d71aecfd0 1 parent 5ef4042
@yrashk authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/main.clp
View
10 src/main.clp
@@ -1,9 +1,11 @@
(defmodule Hypnotoad)
-(defrule load-constructs (require ?filename)
+(defrule load-constructs ?fact <- (require ?filename)
=>
- (load (remote-retrieve-file ?filename)))
+ (load (remote-retrieve-file ?filename))
+ (retract ?fact))
-(defrule load-facts (include ?filename)
+(defrule load-facts ?fact <- (include ?filename)
=>
- (load-facts (remote-retrieve-file ?filename)))
+ (load-facts (remote-retrieve-file ?filename))
+ (retract ?fact))
Please sign in to comment.
Something went wrong with that request. Please try again.