Решение на Poor Man's Currying от Димитър Ковачев

Обратно към всички решения

Към профила на Димитър Ковачев

Резултати

  • 0 точки от тестове
  • 0 бонус точки
  • 0 точки общо
  • 0 успешни тест(а)
  • 6 неуспешни тест(а)

Код

package main
func Generator(gen func (int) int, initial int) func() int {
i := initial - 1
return func() int {
i++
return gen(i)
}
}
func main(){
}

Лог от изпълнението

# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]
# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]
# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]
# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]
# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]
# _/tmp/d20181024-53-1ws0aoi [_/tmp/d20181024-53-1ws0aoi.test]
./solution_test.go:11:13: undefined: Repeater
./solution_test.go:20:15: undefined: MapReducer
./solution_test.go:126:14: undefined: Repeater
./solution_test.go:138:14: undefined: Repeater
./solution_test.go:288:16: undefined: MapReducer
./solution_test.go:298:14: undefined: MapReducer
FAIL	_/tmp/d20181024-53-1ws0aoi [build failed]

История (1 версия и 0 коментара)

Димитър обнови решението на 24.10.2018 16:58 (преди 9 месеца)

+package main
+
+
+
+func Generator(gen func (int) int, initial int) func() int {
+ i := initial - 1
+
+ return func() int {
+ i++
+ return gen(i)
+ }
+}
+
+func main(){
+
+
+}