Commit Graph

26 Commits

Author SHA1 Message Date
f0f28a1318 clean up some dead code 2025-08-06 00:16:50 +01:00
01369627bf begin reimplementing search list data structure 2025-08-05 13:24:55 +01:00
a4ac1b9ae0 add function for testing search-list.sml 2025-08-04 12:08:35 +01:00
f4c9039af1 fix failing unit test in search-list.sml/build-search-list.sml: perform bounds checking into array 2025-08-04 08:33:48 +01:00
d399016c1a add 'SearchList.exists' function to fcore/search-list.sml function, and make sure we check if mmatchedIdx exists before inserting or appending (so we maintain set-like semantics where each number exists only once) 2024-11-24 21:38:58 +00:00
c6343cac40 in fcore/search-list.sml, only call 'insMiddle' function if new value is not in middle 2024-11-24 20:42:17 +00:00
ef395feea8 add similar fix described in previous commit to 'moveLeftAndDelete' function 2024-11-18 11:42:23 +00:00
25046dcb88 bug fix to search-list.sml's 'moveRightAndDelete' function by possibly deleting if start > finish, rather than terminating 2024-11-18 11:29:54 +00:00
e90df37b43 in search-list.sml: fix 'delRightFromHere' and 'delLeftFromHere' functions which joined newHd with left/right, rather than the tl, and therefore added new numbers to the list, which is incorrect behaviour. Fixed this by using joining with 'tl' rather than left/right. In build-search-list.sml: make fromRange function return tuple instead of an instance of app. Finally, in app-update.sml: progress towards refactoring 'helpRemoveChr' function to map and delete from searchList as desired. 2024-11-17 09:25:01 +00:00
f7cc2d4740 change 'targetLength' of SearchList.t from 1024 to 32 2024-11-16 19:59:46 +00:00
5e9f118b15 fixed two issues related to insertion in search-list.sml. First issue: in top level 'insert' function, we called 'insLeft' if new value is greater than first value on right, and we called 'insRight' in the opposite case; this is backwards. Second issue: in base cases of 'insLeft' and 'insRight', when we have reached the end of one side of the list, we used to return the same list we got back instead of adding the new value to this end of the list; this is now fixed. 2024-11-16 19:51:29 +00:00
f2b4f256ec bugfix: in search-list.sml's 'delRightFromHere' function, make sure we preserve the last part of the vector when finish < last 2024-11-16 09:05:47 +00:00
436b3e0d92 simplify and rewrite function 'del' in search-list.sml 2024-11-16 08:33:26 +00:00
0ba56bf6d3 amend lambdas in search-list.sml's 'moveRightAndMap' function, where wrong variable was used in lambda, and rename 'num' variable in that function to 'from' to make purpose and intent clearer 2024-11-16 04:55:02 +00:00
cac0d02fab initial implementation of building search list 2024-11-15 05:37:53 +00:00
cae9f19787 add search list to app type 2024-11-14 08:12:27 +00:00
91663a6cae done implementing search list 2024-11-13 12:54:47 +00:00
11df1a6bcd done implementing delete function in SearchList 2024-11-13 03:49:12 +00:00
fb236aa7a1 add another helper function for deleting in SearchList. (Only one more helper function to go now.) 2024-11-13 03:15:20 +00:00
204d171893 implement a couple of more helper functions for deletion 2024-11-12 20:46:07 +00:00
b24dbd0ede implement a helper function for delete 2024-11-12 13:07:28 +00:00
9b45f43948 start implementing delete in search-list.sml (with top-down programming, calling functions that do not yet exist) 2024-11-12 09:14:39 +00:00
3b81d087f0 implement function to go specific number in search-list.sml 2024-11-12 07:57:36 +00:00
1bae34a067 done with insert into search list 2024-11-12 03:15:04 +00:00
8bf0b64ef3 implement insRight function in search-list.sml 2024-11-12 03:05:14 +00:00
287dc5548d progress implementing searchList data structure 2024-11-11 13:23:37 +00:00