Last active
May 12, 2019 10:26
-
-
Save etorreborre/386e7164c161d94d918bf68dc20e24c0 to your computer and use it in GitHub Desktop.
override-department-names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- short and upper cased names | |
| genDepartmentName = T.take 5 . T.toUpper <$> genText | |
| registry' = | |
| specializeGen @Department genDepartmentName | |
| registry | |
| -- we get specific department names | |
| λ> fmap departmentName <$> (replicateM 5 $ sampleIO (make @(GenIO Department) registry')) | |
| ["CE","UNZ","FG","V","HIB"] | |
| -- but company names are more random | |
| λ> fmap companyName <$> (replicateM 5 $ sampleIO (make @(GenIO Company) registry')) | |
| ["ZgX","cI","nNY","muP","e"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment