gpt-3.5-turbo-0613· OpenAI
Arena Human Preference 55K
You are an expert programmer. Assume tree structure where all nodes have field name…
- User
You are an expert programmer. Assume tree structure where all nodes have field
name(text). Trunk nodes also have field namedjuup(whole number), leaf nodes have two float fieldsxenaandyumi. Write type definition and function to get all names from a tree in Haskell. Respond only with code, no need for explanation. - Assistant
data Tree = Leaf Float Float | Trunk Int [Tree] getNames :: Tree -> [String] getNames (Leaf _ _) = [] getNames (Trunk _ subTrees) = concatMap getNames subTrees
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.