You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
943 B

  1. \ifger{Und jetzt können wir sie nutzen:}{And now we are going to write functions to use it:}
  2. \begin{haskellcode}
  3. isListEmpty :: List t -> Bool
  4. isListEmpty Emtpy = True
  5. isListEmpty x = False
  6. \end{haskellcode}
  7. \pause
  8. \ifger{Wir können sogar Funktionen schreiben wie:}{We can also have:}
  9. \begin{haskellcode}
  10. f :: a -> b
  11. \end{haskellcode}
  12. \ifger{D.h. was auch immer diese Funktion macht, sie bekommt etwas von einem Typ rein und gibt etwas von einem anderen Typ aus. \hinline{a} und \hinline{b} könnten vom selben Typ sein, müssen aber nicht! D.h. Funktionen dieser Art geben uns häufig mehr Freiheit. Mehr können wir über diese Funktion nicht sagen.}{So, whatever the function does... it gets something of one type and returns something of another type. \hinline{b} \emph{could} be the same type as \hinline{a} here, but it doesn't need to, so functions of this type often give us more freedom! That's all we know about this function.}