Closed
Description
plugin GO v0.10.852
idea 15.0.1 #IC-143.382
package main
import "fmt"
type Neuron struct {
ID int
}
type Signal struct {
Value float64
ID string
}
func (s *Signal) IsNull() bool {
if s.Value != 0 {
return false
}
return true
}
type Dendrit chan *Signal
func (d Dendrit) Sinops(n *Neuron) {
for {
select {
case signal := <-d:
if signal.IsNull() { // not found method
continue
}
// Value not found also
fmt.Printf("NID=%d\t<- %g (IN)\n", n.ID, signal.Value)
default:
continue
}
}
}
func main() {
fmt.Println("Hello, playground")
}