#Making a basic interactive program (error: type 'state' is not defined)

1 messages · Page 1 of 1 (latest)

quick brook
#

I'm trying to make an interactive program, that prints out whatever key I'm pressing to the console. The program is using some functions, that you might be unfamiliar with, becuase they are made by my professor.

abstract nebula
#

I have questions... why Some None? Whats the definition of type state. Second, you missed the first | in the match expression

quick brook
#

Thank you, your questions actually made me realise a lot of things. My teacher said that the first | in the match with isnt needed.

#

it works now, but i'm not sure if my solution is optimal

abstract nebula
#

are you updating state at all?

quick brook
#

no, it's not meant to yet, but state is used later in my next exercise