summaryrefslogtreecommitdiff
path: root/nascent5.js
diff options
context:
space:
mode:
authorKarl Semich <fuzzyTew@gmail.com>2019-10-22 06:56:50 -0400
committerKarl Semich <fuzzyTew@gmail.com>2019-10-22 06:56:50 -0400
commit9f3db5ed4e0bf342a159e1d45105bfcaf7b8a7bd (patch)
tree83c4aaebcafec206f551523a4b091ea5167517fd /nascent5.js
parent5a548e692abcf226d1a21b5b186ede67dca8b0ff (diff)
downloadstandingwithresilience-9f3db5ed4e0bf342a159e1d45105bfcaf7b8a7bd.tar.gz
standingwithresilience-9f3db5ed4e0bf342a159e1d45105bfcaf7b8a7bd.zip
developing my plans
Diffstat (limited to 'nascent5.js')
-rw-r--r--nascent5.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/nascent5.js b/nascent5.js
index b07afec..1d9e8ae 100644
--- a/nascent5.js
+++ b/nascent5.js
@@ -22,7 +22,8 @@ class Properties {
}
has(type, dest) {
for (let p of this.props)
- if (p.type == type && p.dest == dest)
+ if ((p.type == type || isVar(type))
+ && (p.dest == dest || isVar(dest)))
return true
return false
}
@@ -36,6 +37,9 @@ class Properties {
}
return false
}
+ hasIsVar() {
+ return this.has('is','variable')
+ }
}
class AbstractData {
constructor(from) {
@@ -57,6 +61,14 @@ class ArrayData extends Array {
}
}
+// Abstractions?
+const VAR_X = new StringData('X')
+VAR_X.props.add('is','variable')
+// recommend e.g. 'is','variable-rep' when code is designing them, so don't match everything
+function isVar(x) {
+ return x.props && x.props.has('is','variable')
+}
+
// MEMORY
// the archivist. Provides for needs of data. Memory is relevent whenever there is
// an informational need.
@@ -159,7 +171,7 @@ class FunctionData {
//)
// - place a value in such a place
// - retrieve a value from such a place
-// data-structures:
+// data-structures: (these are like promises of what to do and how to use something)
// - make a class definition (collection of variables)
// - initialize an object
// - set/retrieve properties (variables)
@@ -270,6 +282,7 @@ genprophaslines = new FunctionData(
// [how do we pull a need out of the list?]
// make a habit that plans core behavior
+// for some other ideas, see this function in nascent6.js
findstepsfor = new FunctionData(
'findstepsfor',
/*call*/(need, depth) => {