<jupyter_start><jupyter_text>10. Interactive programming  10.1 The problem  10.2 The solution  10.3 Basic actions<jupyter_code>:type getChar
:type putChar
:type return
putChar 'a'
putChar 'b'
getChar
getChar
return 'd'<jupyter_output><empty_output><jupyter_text>10.4 Sequencing<jupyter_code>act :: IO (Char, Char)
act = do x <- getChar
         getChar
         y <- getChar
         return (x,y)
act
act' :: IO (Char, Char)
act' = do x <- (return 'a')
          (return 'b')
          y <- (return '\n')
          return (x,y)
act'<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13167259786476868, 'fraction_numerical': 0.02491103202846975, 'mean_word_length': 3.201492537313433, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '387359', 'license': 'MIT', 'n_tokens_mistral': 220, 'n_tokens_neox': 209, 'n_words': 56, 'path': '10 Interactive programming.ipynb', 'repo_name': 'kyagrd/ProgrammingInHaskell2ndCoCalc', 'size': '562'}