Difference between revisions of "Mutable List Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
=Code to Implement=
 
=Code to Implement=
fun create_mutable_list_from_immutable_list(xs) : 'a mutable_list =  
+
fun create_mutable_list_from_immutable_list(xs) : 'a mutable_list =  
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun create_empty_mutable_list() : 'a mutable_list =  
+
fun create_empty_mutable_list() : 'a mutable_list =  
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun create_mutable_list_from_other_mutable_list(ml) : 'a mutable_list =  
+
fun create_mutable_list_from_other_mutable_list(ml) : 'a mutable_list =  
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun to_immutable(ml : 'a mutable_list) : 'a list =
+
fun to_immutable(ml : 'a mutable_list) : 'a list =
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun length(ml : 'a mutable_list) : int =
+
fun length(ml : 'a mutable_list) : int =
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun insert_at_front(ml : 'a mutable_list, item : 'a) : unit =
+
fun insert_at_front(ml : 'a mutable_list, item : 'a) : unit =
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun insert_at_back(ml : 'a mutable_list, item : 'a) : unit =
+
fun insert_at_back(ml : 'a mutable_list, item : 'a) : unit =
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun remove_first_match(ml : ''a mutable_list, item : ''a) : bool =
+
fun remove_first_match(ml : ''a mutable_list, item : ''a) : bool =
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun concat(a : 'a mutable_list, b : 'a mutable_list) : unit =  
+
fun concat(a : 'a mutable_list, b : 'a mutable_list) : unit =  
 
     raise NotYetImplemented
 
     raise NotYetImplemented
  
fun reverse(ml : 'a mutable_list) : unit =
+
fun reverse(ml : 'a mutable_list) : unit =
 
     raise NotYetImplemented
 
     raise NotYetImplemented

Revision as of 06:21, 13 October 2020

Code to Implement

fun create_mutable_list_from_immutable_list(xs) : 'a mutable_list = 
   raise NotYetImplemented
fun create_empty_mutable_list() : 'a mutable_list = 
   raise NotYetImplemented
fun create_mutable_list_from_other_mutable_list(ml) : 'a mutable_list = 
   raise NotYetImplemented
fun to_immutable(ml : 'a mutable_list) : 'a list =
   raise NotYetImplemented
fun length(ml : 'a mutable_list) : int =
   raise NotYetImplemented
fun insert_at_front(ml : 'a mutable_list, item : 'a) : unit =
   raise NotYetImplemented
fun insert_at_back(ml : 'a mutable_list, item : 'a) : unit =
   raise NotYetImplemented
fun remove_first_match(ml : a mutable_list, item : a) : bool =
   raise NotYetImplemented
fun concat(a : 'a mutable_list, b : 'a mutable_list) : unit = 
   raise NotYetImplemented
fun reverse(ml : 'a mutable_list) : unit =
   raise NotYetImplemented